2023-05-29 06:37:34 +02:00
|
|
|
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() {
|
2023-05-29 06:37:34 +02:00
|
|
|
const [tab, setTab] = useState('create');
|
2023-05-18 08:20:06 +02:00
|
|
|
const { formatMessage, labels } = useMessages();
|
|
|
|
|
|
|
|
return (
|
|
|
|
<AppLayout title={formatMessage(labels.reports)}>
|
2023-05-29 06:37:34 +02:00
|
|
|
<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>
|
|
|
|
);
|
|
|
|
}
|