mirror of
https://github.com/umami-software/umami.git
synced 2026-02-13 00:55:37 +01:00
Added ability to delete reports.
This commit is contained in:
parent
ad710cc86a
commit
95d824542f
8 changed files with 159 additions and 40 deletions
|
|
@ -7,7 +7,11 @@ import WebsiteHeader from './WebsiteHeader';
|
|||
|
||||
export function WebsiteReportsPage({ websiteId }) {
|
||||
const { formatMessage, labels } = useMessages();
|
||||
const { reports, error, isLoading } = useReports(websiteId);
|
||||
const { reports, error, isLoading, deleteReport } = useReports(websiteId);
|
||||
|
||||
const handleDelete = async id => {
|
||||
await deleteReport(id);
|
||||
};
|
||||
|
||||
return (
|
||||
<Page loading={isLoading} error={error}>
|
||||
|
|
@ -22,7 +26,7 @@ export function WebsiteReportsPage({ websiteId }) {
|
|||
</Button>
|
||||
</Link>
|
||||
</Flexbox>
|
||||
<ReportsTable websiteId={websiteId} data={reports} />
|
||||
<ReportsTable data={reports} onDelete={handleDelete} />
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue