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

21 lines
420 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;
}
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-01-30 08:10:25 +00:00
return <TestConsole websiteId={websiteId?.[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',
};