umami/pages/reports/index.js

22 lines
787 B
JavaScript
Raw Normal View History

import { useState } from 'react';
import { Item, Tabs } from 'react-basics';
2023-05-18 08:20:06 +02:00
import AppLayout from 'components/layout/AppLayout';
2023-05-20 18:02:08 +02:00
import ReportList from 'components/pages/reports/ReportList';
2023-05-18 08:20:06 +02:00
import useMessages from 'hooks/useMessages';
export default function ReportsPage() {
const [tab, setTab] = useState('create');
2023-05-18 08:20:06 +02:00
const { formatMessage, labels } = useMessages();
return (
<AppLayout title={formatMessage(labels.reports)}>
<Tabs selectedKey={tab} onSelect={setTab} style={{ marginBottom: 30, fontSize: 14 }}>
<Item key="create">{formatMessage(labels.reports)}</Item>
<Item key="saved">{formatMessage(labels.save)}</Item>
</Tabs>
{tab === 'create' && <ReportList />}
{tab === 'saved' && <h1>My reports</h1>}
2023-05-18 08:20:06 +02:00
</AppLayout>
);
}