mirror of
https://github.com/umami-software/umami.git
synced 2026-02-17 11:05:36 +01:00
Insights progress update.
This commit is contained in:
parent
4497951000
commit
2d04e46ded
3 changed files with 85 additions and 7 deletions
|
|
@ -6,11 +6,13 @@ import { ReportContext } from '../Report';
|
|||
export function InsightsTable() {
|
||||
const { report } = useContext(ReportContext);
|
||||
const { formatMessage, labels } = useMessages();
|
||||
const { fields = [] } = report?.parameters || {};
|
||||
|
||||
return (
|
||||
<GridTable data={report?.data || []}>
|
||||
<GridColumn name="field" label={formatMessage(labels.field)} />
|
||||
<GridColumn name="value" label={formatMessage(labels.value)} />
|
||||
{fields.map(({ name }) => {
|
||||
return <GridColumn key={name} name={name} label={name} />;
|
||||
})}
|
||||
<GridColumn name="total" label={formatMessage(labels.total)} />
|
||||
</GridTable>
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue