Browse Source

fix: handle subpaths in menu entries navigation

Signed-off-by: alok8bb <alok8bb@gmail.com>
pull/2/head
alok8bb 3 months ago
parent
commit
fa2c5c117a
Failed to extract signature
  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