mirror of
https://github.com/kremalicious/umami.git
synced 2024-11-15 17:55:08 +01:00
ba31f48f1a
* add uuid to event. add indexes * eventdata api * add event data * remove test data * update list
27 lines
603 B
JavaScript
27 lines
603 B
JavaScript
import React from 'react';
|
|
import Layout from 'components/layout/Layout';
|
|
import TestConsole from 'components/pages/TestConsole';
|
|
import useRequireLogin from 'hooks/useRequireLogin';
|
|
import useUser from 'hooks/useUser';
|
|
|
|
export default function ConsolePage({ enabled }) {
|
|
const { loading } = useRequireLogin();
|
|
const { user } = useUser();
|
|
|
|
if (loading || !enabled || !user?.isAdmin) {
|
|
return null;
|
|
}
|
|
|
|
return (
|
|
<Layout>
|
|
<TestConsole />
|
|
</Layout>
|
|
);
|
|
}
|
|
|
|
export async function getServerSideProps() {
|
|
return {
|
|
props: { enabled: !!process.env.ENABLE_TEST_CONSOLE },
|
|
};
|
|
}
|