From 8397102bac88226508c7d6866152f78e0bfa49c8 Mon Sep 17 00:00:00 2001 From: Mike Cao Date: Sat, 1 Apr 2023 20:03:38 -0700 Subject: [PATCH] Switch to next/font. --- components/layout/AppLayout.js | 13 +++++-------- components/metrics/FilterTags.js | 6 +++--- lib/constants.ts | 2 -- package.json | 1 - pages/_app.js | 9 ++++++--- styles/index.css | 3 --- yarn.lock | 5 ----- 7 files changed, 14 insertions(+), 25 deletions(-) diff --git a/components/layout/AppLayout.js b/components/layout/AppLayout.js index 58717e7e..3a70685a 100644 --- a/components/layout/AppLayout.js +++ b/components/layout/AppLayout.js @@ -5,7 +5,6 @@ import NavBar from 'components/layout/NavBar'; import UpdateNotice from 'components/common/UpdateNotice'; import useRequireLogin from 'hooks/useRequireLogin'; import useConfig from 'hooks/useConfig'; -import { UI_LAYOUT_BODY } from 'lib/constants'; import styles from './AppLayout.module.css'; export default function AppLayout({ title, children }) { @@ -25,14 +24,12 @@ export default function AppLayout({ title, children }) { {title ? `${title} | umami` : 'umami'} -
+
-
- -
{children}
-
-
+ +
+ {children} +
); } diff --git a/components/metrics/FilterTags.js b/components/metrics/FilterTags.js index bd7749dd..4a470ffe 100644 --- a/components/metrics/FilterTags.js +++ b/components/metrics/FilterTags.js @@ -17,8 +17,8 @@ export default function FilterTags({ websiteId, params }) { } function handleCloseFilter(param) { - if (param === null) { - router.push(`/websites/${websiteId}/?view=${view}`); + if (!param) { + router.push(`/websites/${websiteId}${view ? `?view=${view}` : ''}`); } else { router.push(resolveUrl({ [param]: undefined })); } @@ -41,7 +41,7 @@ export default function FilterTags({ websiteId, params }) { ); })} -