mirror of
https://github.com/umami-software/umami.git
synced 2026-02-14 01:25:37 +01:00
New reports screens.
This commit is contained in:
parent
293e84acab
commit
2b13002f1b
9 changed files with 101 additions and 14 deletions
29
components/pages/reports/ReportsList.js
Normal file
29
components/pages/reports/ReportsList.js
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
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 ReportsList() {
|
||||
const { formatMessage, labels } = useMessages();
|
||||
const { reports, error, isLoading } = useReports();
|
||||
|
||||
return (
|
||||
<Page loading={isLoading} error={error}>
|
||||
<PageHeader title="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 ReportsList;
|
||||
Loading…
Add table
Add a link
Reference in a new issue