From d851a9e88bcc540566d7a69eb8021c73e98380a0 Mon Sep 17 00:00:00 2001 From: Mike Cao Date: Tue, 4 Apr 2023 00:27:25 -0700 Subject: [PATCH] Fixed test console error. --- components/pages/console/TestConsole.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/components/pages/console/TestConsole.js b/components/pages/console/TestConsole.js index f1571807..685f5458 100644 --- a/components/pages/console/TestConsole.js +++ b/components/pages/console/TestConsole.js @@ -49,15 +49,13 @@ export default function TestConsole() { return null; } - const websiteId = id?.[0]; + const [websiteId] = id || []; const website = data.find(({ id }) => websiteId === id); return ( - - {router.query.id[2] ? `Umami Console page ${router.query.id[2]}` : 'Umami Console Select'} - + {website ? `${website.name} | Umami Console` : 'Umami Console'} @@ -74,10 +72,10 @@ export default function TestConsole() {
Page links
- page one + page one
- page two + page two