seedling/source/ui/src/app/routes.ts
Roman Jaroš 68ce70e5a0
All checks were successful
forgejo/Procyon/seedling/pipeline/head This commit looks good
Rename to Procyon
Change-Id: I812c93e057039c0c6a8bea8079c8b9cda6357133
2023-11-16 11:48:17 +01:00

16 lines
364 B
TypeScript

// @ts-nocheck
import { DotNestedKeys } from '@procyon/localization/types';
export const Routes = {
root: '/'
};
export const buildRoute = (route: DotNestedKeys<typeof Routes>) => {
let path = '';
let obj: Record<string, any> = Routes;
route.split('.').forEach((key: any) => {
path += obj[key]?.base ?? obj[key];
obj = obj[key];
});
return path;
};