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