Browse Source

merge: #2 from alok8bb/master

fix: handle subpaths in menu entries navigation
master
Muthu Kumar 3 months ago
committed by GitHub
parent
commit
30f62530f9
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 4
      src/components/Container.tsx

4
src/components/Container.tsx

@ -120,7 +120,9 @@ const Container: React.FC<{
} catch {}
};
const current = MenuEntries.findIndex(([, path]) => location === path);
const current = MenuEntries.findIndex(
([, path]) => location === path || location.startsWith(path + "/"),
);
const next = get.next(MenuEntries, current)[1];
const prev = get.prev(MenuEntries, current)[1];
const end = current === MenuEntries.length - 1;

Loading…
Cancel
Save