Added reports section.
This commit is contained in:
13
pages/api/websites/[id]/data.ts
Normal file
13
pages/api/websites/[id]/data.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { NextApiResponse } from 'next';
|
||||
import { useAuth } from 'lib/middleware';
|
||||
import { NextApiRequestQueryBody, User } from 'lib/types';
|
||||
import { ok } from 'next-basics';
|
||||
|
||||
export default async (
|
||||
req: NextApiRequestQueryBody<unknown, unknown>,
|
||||
res: NextApiResponse<User>,
|
||||
) => {
|
||||
await useAuth(req, res);
|
||||
|
||||
return ok(res, req.auth.user);
|
||||
};
|
||||
5
pages/reports/event-data/index.js
Normal file
5
pages/reports/event-data/index.js
Normal file
@@ -0,0 +1,5 @@
|
||||
import EventDataReport from 'components/pages/reports/EventDataReport';
|
||||
|
||||
export default function Report() {
|
||||
return <EventDataReport />;
|
||||
}
|
||||
13
pages/reports/index.js
Normal file
13
pages/reports/index.js
Normal file
@@ -0,0 +1,13 @@
|
||||
import AppLayout from 'components/layout/AppLayout';
|
||||
import ReportsList from 'components/pages/reports/ReportsList';
|
||||
import useMessages from 'hooks/useMessages';
|
||||
|
||||
export default function ReportsPage() {
|
||||
const { formatMessage, labels } = useMessages();
|
||||
|
||||
return (
|
||||
<AppLayout title={formatMessage(labels.reports)}>
|
||||
<ReportsList />
|
||||
</AppLayout>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user