Mobile Navbar #75

Merged
a258wang merged 17 commits from feat/navbar-mobile into main 2021-07-07 18:13:40 -04:00
2 changed files with 3 additions and 1 deletions
Showing only changes of commit 00dc27620f - Show all commits

View File

@ -237,6 +237,7 @@
height: stretch;
top: 0;
right: 0;
overflow: auto;
padding: calc(calc(64rem / 16) - 1rem) calc(calc(64rem / 16) - 1rem)
calc(calc(64rem / 16) - 1rem) calc(calc(78rem / 16) - 1rem);

View File

@ -163,7 +163,7 @@ function reducer(state: MobileState, action: MobileAction): MobileState {
isNavOpen: true,
activeSubmenus: new Set([getMainRoute(action.route)]),
};
case "toggle":
case "toggle": {
const newSet = new Set(state.activeSubmenus);
if (state.activeSubmenus.has(getMainRoute(action.route))) {
newSet.delete(getMainRoute(action.route));
@ -174,6 +174,7 @@ function reducer(state: MobileState, action: MobileAction): MobileState {
isNavOpen: state.isNavOpen,
activeSubmenus: newSet,
};
}
case "close":
return initialState;
}