From f19a1d8ac04a8399daa5afd12c45e1f4f28d28dc Mon Sep 17 00:00:00 2001 From: Max Lynch Date: Wed, 30 Dec 2020 23:01:42 -0600 Subject: [PATCH] Some cleanup --- components/AppShell.jsx | 7 +++-- components/pages/ListDetail.jsx | 18 +++++++------ hooks/useLocation.js | 48 ++++++++++++++++----------------- hooks/usePage.js | 5 ++-- pages/lists/[listId].js | 10 +++---- store/actions.js | 1 + store/index.js | 1 - store/selectors.js | 1 - 8 files changed, 44 insertions(+), 47 deletions(-) diff --git a/components/AppShell.jsx b/components/AppShell.jsx index 2e87218..859257e 100644 --- a/components/AppShell.jsx +++ b/components/AppShell.jsx @@ -52,7 +52,7 @@ const CurrentPage = ({ page, pageProps = {} }) => { }; const AppShell = ({ page, pageProps }) => { - const [location, setLocation] = useLocation(); + const [location] = useLocation(); const showMenu = Store.useState(selectors.getMenuOpen); const showNotifications = Store.useState(selectors.getNotificationsOpen); @@ -80,7 +80,7 @@ const AppShell = ({ page, pageProps }) => { } ); - console.log('Got location', location, '/settings' === location); + console.log('Got location', location); // This is an example app layout. We've got a hidden menu that will be toggled // @@ -97,7 +97,6 @@ const AppShell = ({ page, pageProps }) => {