mirror of
https://github.com/kremalicious/umami.git
synced 2025-01-11 13:44:01 +01:00
Fixed test console error.
This commit is contained in:
parent
c30aa4c0b6
commit
d851a9e88b
@ -49,15 +49,13 @@ export default function TestConsole() {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
const websiteId = id?.[0];
|
const [websiteId] = id || [];
|
||||||
const website = data.find(({ id }) => websiteId === id);
|
const website = data.find(({ id }) => websiteId === id);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Page loading={isLoading} error={error}>
|
<Page loading={isLoading} error={error}>
|
||||||
<Head>
|
<Head>
|
||||||
<title>
|
<title>{website ? `${website.name} | Umami Console` : 'Umami Console'}</title>
|
||||||
{router.query.id[2] ? `Umami Console page ${router.query.id[2]}` : 'Umami Console Select'}
|
|
||||||
</title>
|
|
||||||
</Head>
|
</Head>
|
||||||
<PageHeader title="Test console">
|
<PageHeader title="Test console">
|
||||||
<WebsiteSelect websiteId={website?.id} onSelect={handleChange} />
|
<WebsiteSelect websiteId={website?.id} onSelect={handleChange} />
|
||||||
@ -74,10 +72,10 @@ export default function TestConsole() {
|
|||||||
<Column xs="4">
|
<Column xs="4">
|
||||||
<div className={styles.header}>Page links</div>
|
<div className={styles.header}>Page links</div>
|
||||||
<div>
|
<div>
|
||||||
<Link href={`/console/${websiteId}/page/1/?q=123`}>page one</Link>
|
<Link href={`/console/${websiteId}/page/1/?q=abc`}>page one</Link>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<Link href={`/console/${websiteId}/page/2/?q=456 `}>page two</Link>
|
<Link href={`/console/${websiteId}/page/2/?q=123 `}>page two</Link>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<a href="https://www.google.com" data-umami-event="external-link-direct">
|
<a href="https://www.google.com" data-umami-event="external-link-direct">
|
||||||
|
Loading…
Reference in New Issue
Block a user