mirror of
https://github.com/kremalicious/umami.git
synced 2024-12-04 23:05:13 +01:00
30 lines
877 B
JavaScript
30 lines
877 B
JavaScript
import Page from 'components/layout/Page';
|
|
import PageHeader from 'components/layout/PageHeader';
|
|
import Link from 'next/link';
|
|
import { Button, Icon, Icons, Text } from 'react-basics';
|
|
import { useMessages, useReports } from 'hooks';
|
|
import ReportsTable from './ReportsTable';
|
|
|
|
export function ReportsPage() {
|
|
const { formatMessage, labels } = useMessages();
|
|
const { reports, error, isLoading } = useReports();
|
|
|
|
return (
|
|
<Page loading={isLoading} error={error}>
|
|
<PageHeader title={formatMessage(labels.reports)}>
|
|
<Link href="/reports/create">
|
|
<Button variant="primary">
|
|
<Icon>
|
|
<Icons.Plus />
|
|
</Icon>
|
|
<Text>{formatMessage(labels.createReport)}</Text>
|
|
</Button>
|
|
</Link>
|
|
</PageHeader>
|
|
<ReportsTable data={reports} />
|
|
</Page>
|
|
);
|
|
}
|
|
|
|
export default ReportsPage;
|