umami/src/app/(main)/console/[[...id]]/page.tsx
2023-10-19 17:01:21 -07:00

20 lines
406 B
TypeScript

import TestConsole from '../TestConsole';
import { Metadata } from 'next';
async function getEnabled() {
return !!process.env.ENABLE_TEST_CONSOLE;
}
export default async function ({ params: { id } }) {
const enabled = await getEnabled();
if (!enabled) {
return null;
}
return <TestConsole websiteId={id?.[0]} />;
}
export const metadata: Metadata = {
title: 'Test Console | umami',
};