Files
prod-wag-backend-automate-s…/WebServices/management-frontend/src/eventRouters/pageRetriever.tsx
2025-04-30 00:44:13 +03:00

11 lines
340 B
TypeScript

import { PageProps } from "../validations/translations/translation";
import { UnAuthorizedPage } from "./unauthorizedpage";
import menuPages from "./index";
export function retrievePageByUrl(url: string): React.FC<PageProps> {
if (url in menuPages) {
return menuPages[url as keyof typeof menuPages];
}
return UnAuthorizedPage;
}