261021_01_ENH: 1차 마이그레이션 완료
This commit is contained in:
20
src/lib/report-navigation.ts
Normal file
20
src/lib/report-navigation.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import type { Route } from "next";
|
||||
|
||||
export function isProjectPage(path: string): boolean {
|
||||
return [
|
||||
"/Report/Current",
|
||||
"/Report/Quota",
|
||||
"/Report/Tabulation",
|
||||
"/Report/Crosstab",
|
||||
"/Management/Derived",
|
||||
"/Management/Exim",
|
||||
].includes(path);
|
||||
}
|
||||
|
||||
/**
|
||||
* Project pages carry no project in the address (legacy KART kept it in client state); the
|
||||
* selected project lives in useSelectedProject. Other paths open the progress page.
|
||||
*/
|
||||
export function projectPagePath(path: string): Route {
|
||||
return (isProjectPage(path) ? path : "/Report/Current") as Route;
|
||||
}
|
||||
Reference in New Issue
Block a user