This commit is contained in:
Max Lynch
2020-12-30 16:27:38 -06:00
parent 1a8d9c529e
commit e115a5a7ce
7 changed files with 71 additions and 49 deletions
+8 -4
View File
@@ -60,6 +60,8 @@ const CurrentPage = ({ page }) => {
};
const AppShell = ({ page }) => {
const [location, setLocation] = useLocation();
const showMenu = Store.useState(selectors.getMenuOpen);
const showNotifications = Store.useState(selectors.getNotificationsOpen);
const currentPage = Store.useState(selectors.getCurrentPage);
@@ -86,6 +88,8 @@ const AppShell = ({ page }) => {
}
);
console.log('Got location', location, '/settings' === location);
// This is an example app layout. We've got a hidden menu that will be toggled
//
return (
@@ -109,21 +113,21 @@ const AppShell = ({ page }) => {
selectedIcon={home}
title="Home"
href="/"
selected={'home' === currentPage?.id}
selected={'/home' === location}
/>
<Tab
icon={listOutline}
selectedIcon={list}
title="Lists"
href="/lists"
selected={'lists' === currentPage?.id}
selected={'/lists' === location}
/>
<Tab
icon={cogOutline}
selectedIcon={cog}
title="settings"
title="Settings"
href="/settings"
selected={'settings' === currentPage?.id}
selected={'/settings' === location}
/>
</TabBar>
<Backdrop open={showMenu || showNotifications} onClose={backdropClose} />