diff --git a/src/App.tsx b/src/App.tsx index c13ab17..7f30552 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -41,17 +41,14 @@ export function getPalette(part: string): string { export const routeResolver = new RouteResolver({ home: '', journals: { - _base: 'journals', _id: { _base: ':journalUid', items: { - _base: 'items', _id: { _base: ':itemUid', }, }, entries: { - _base: 'entries', _id: { _base: ':entryUid', }, diff --git a/src/routes.tsx b/src/routes.tsx index c27093a..0154acd 100644 --- a/src/routes.tsx +++ b/src/routes.tsx @@ -12,7 +12,7 @@ export class RouteResolver { let path: string[] = []; name.split('.').forEach((key) => { - const val = (typeof dict[key] === 'string') ? dict[key] : dict[key]._base; + const val = (typeof dict[key] === 'string') ? dict[key] : (dict[key]._base) ? dict[key]._base : key; path.push(val); dict = dict[key];