umami/src/app/(main)/console/[[...websiteId]]/page.tsx

21 lines
420 B
TypeScript
Raw Normal View History

2023-09-30 03:19:27 +00:00
import { Metadata } from 'next';
2024-02-06 07:59:33 +00:00
import ConsolePage from '../ConsolePage';
2023-09-29 12:29:22 +00:00
async function getEnabled() {
return !!process.env.ENABLE_TEST_CONSOLE;
}
2024-01-30 08:10:25 +00:00
export default async function ({ params: { websiteId } }) {
2023-09-29 12:29:22 +00:00
const enabled = await getEnabled();
if (!enabled) {
return null;
}
2024-02-06 07:59:33 +00:00
return <ConsolePage websiteId={websiteId?.[0]} />;
2023-09-29 12:29:22 +00:00
}
2023-09-30 03:19:27 +00:00
export const metadata: Metadata = {
2024-02-03 01:49:17 +00:00
title: 'Test Console | Umami',
2023-09-30 03:19:27 +00:00
};