mirror of
https://github.com/kremalicious/umami.git
synced 2024-11-16 02:05:04 +01:00
Re-add add reports button.
This commit is contained in:
parent
e518d445fc
commit
bc7111a984
@ -3,13 +3,11 @@ import Page from 'components/layout/Page';
|
||||
import PageHeader from 'components/layout/PageHeader';
|
||||
import { useMessages, useReports } from 'hooks';
|
||||
import Link from 'next/link';
|
||||
import useConfig from 'hooks/useConfig';
|
||||
import { Button, Icon, Icons, Text } from 'react-basics';
|
||||
import ReportsTable from './ReportsTable';
|
||||
|
||||
export function ReportsPage() {
|
||||
const { formatMessage, labels, messages } = useMessages();
|
||||
const { cloudMode } = useConfig();
|
||||
const {
|
||||
reports,
|
||||
error,
|
||||
@ -26,16 +24,14 @@ export function ReportsPage() {
|
||||
return (
|
||||
<Page loading={isLoading} error={error}>
|
||||
<PageHeader title={formatMessage(labels.reports)}>
|
||||
{!cloudMode && (
|
||||
<Link href="/reports/create">
|
||||
<Button variant="primary">
|
||||
<Icon>
|
||||
<Icons.Plus />
|
||||
</Icon>
|
||||
<Text>{formatMessage(labels.createReport)}</Text>
|
||||
</Button>
|
||||
</Link>
|
||||
)}
|
||||
<Link href="/reports/create">
|
||||
<Button variant="primary">
|
||||
<Icon>
|
||||
<Icons.Plus />
|
||||
</Icon>
|
||||
<Text>{formatMessage(labels.createReport)}</Text>
|
||||
</Button>
|
||||
</Link>
|
||||
</PageHeader>
|
||||
|
||||
{hasData && (
|
||||
|
Loading…
Reference in New Issue
Block a user