mirror of
https://github.com/umami-software/umami.git
synced 2026-02-13 09:05:36 +01:00
Event data report UI.
This commit is contained in:
parent
6316a0b917
commit
9d7862cbd6
36 changed files with 660 additions and 254 deletions
|
|
@ -1,20 +1,24 @@
|
|||
import { useRouter } from 'next/router';
|
||||
import AppLayout from 'components/layout/AppLayout';
|
||||
import FunnelReport from 'components/pages/reports/funnel/FunnelReport';
|
||||
import useMessages from 'hooks/useMessages';
|
||||
import ReportDetails from 'components/pages/reports/ReportDetails';
|
||||
import { useApi, useMessages } from 'hooks';
|
||||
|
||||
export default function ReportsPage() {
|
||||
const { formatMessage, labels } = useMessages();
|
||||
const router = useRouter();
|
||||
const { id } = router.query;
|
||||
const { get, useQuery } = useApi();
|
||||
const { data: report } = useQuery(['reports', id], () => get(`/reports/${id}`), {
|
||||
enabled: !!id,
|
||||
});
|
||||
|
||||
if (!id) {
|
||||
if (!id || !report) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<AppLayout title={formatMessage(labels.websites)}>
|
||||
<FunnelReport reportId={id} />
|
||||
<ReportDetails reportId={report.id} reportType={report.type} />
|
||||
</AppLayout>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue