mirror of
https://github.com/umami-software/umami.git
synced 2026-02-23 14:05:35 +01:00
Scaffolding for insights report.
This commit is contained in:
parent
2f4d669836
commit
827102d907
9 changed files with 305 additions and 17 deletions
19
components/pages/reports/insights/InsightsTable.js
Normal file
19
components/pages/reports/insights/InsightsTable.js
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
import { useContext } from 'react';
|
||||
import { GridTable, GridColumn } from 'react-basics';
|
||||
import { useMessages } from 'hooks';
|
||||
import { ReportContext } from '../Report';
|
||||
|
||||
export function InsightsTable() {
|
||||
const { report } = useContext(ReportContext);
|
||||
const { formatMessage, labels } = useMessages();
|
||||
|
||||
return (
|
||||
<GridTable data={report?.data || []}>
|
||||
<GridColumn name="field" label={formatMessage(labels.field)} />
|
||||
<GridColumn name="value" label={formatMessage(labels.value)} />
|
||||
<GridColumn name="total" label={formatMessage(labels.total)} />
|
||||
</GridTable>
|
||||
);
|
||||
}
|
||||
|
||||
export default InsightsTable;
|
||||
Loading…
Add table
Add a link
Reference in a new issue