mirror of
https://github.com/umami-software/umami.git
synced 2026-02-23 14:05:35 +01:00
30 lines
932 B
TypeScript
30 lines
932 B
TypeScript
'use client';
|
|
import Link from 'next/link';
|
|
import { Button, Flexbox, Icon, Icons, Text } from 'react-basics';
|
|
import { useMessages, useTeamUrl } from '@/components/hooks';
|
|
import WebsiteHeader from '../WebsiteHeader';
|
|
import ReportsDataTable from '@/app/(main)/reports/ReportsDataTable';
|
|
|
|
export function WebsiteReportsPage({ websiteId }) {
|
|
const { formatMessage, labels } = useMessages();
|
|
const { renderTeamUrl } = useTeamUrl();
|
|
|
|
return (
|
|
<>
|
|
<WebsiteHeader websiteId={websiteId} />
|
|
<Flexbox alignItems="center" justifyContent="end">
|
|
<Link href={renderTeamUrl('/reports/create')}>
|
|
<Button variant="primary">
|
|
<Icon>
|
|
<Icons.Plus />
|
|
</Icon>
|
|
<Text>{formatMessage(labels.createReport)}</Text>
|
|
</Button>
|
|
</Link>
|
|
</Flexbox>
|
|
<ReportsDataTable websiteId={websiteId} />
|
|
</>
|
|
);
|
|
}
|
|
|
|
export default WebsiteReportsPage;
|