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

21 lines
406 B
TypeScript
Raw Normal View History

2023-09-29 12:29:22 +00:00
import TestConsole from '../TestConsole';
2023-09-30 03:19:27 +00:00
import { Metadata } from 'next';
2023-09-29 12:29:22 +00:00
async function getEnabled() {
return !!process.env.ENABLE_TEST_CONSOLE;
}
2023-10-20 00:01:21 +00:00
export default async function ({ params: { id } }) {
2023-09-29 12:29:22 +00:00
const enabled = await getEnabled();
if (!enabled) {
return null;
}
2023-10-20 00:01:21 +00:00
return <TestConsole websiteId={id?.[0]} />;
2023-09-29 12:29:22 +00:00
}
2023-09-30 03:19:27 +00:00
export const metadata: Metadata = {
title: 'Test Console | umami',
};