mirror of
https://github.com/umami-software/umami.git
synced 2026-02-08 22:57:12 +01:00
Insights progress update.
This commit is contained in:
parent
4497951000
commit
2d04e46ded
3 changed files with 85 additions and 7 deletions
|
|
@ -33,14 +33,12 @@ export function ReportTemplates() {
|
|||
const { formatMessage, labels } = useMessages();
|
||||
|
||||
const reports = [
|
||||
/*
|
||||
{
|
||||
title: formatMessage(labels.insights),
|
||||
description: 'Dive deeper into your data by using segments and filters.',
|
||||
url: '/reports/insights',
|
||||
icon: <Lightbulb />,
|
||||
},
|
||||
*/
|
||||
{
|
||||
title: formatMessage(labels.funnel),
|
||||
description: 'Understand the conversion and drop-off rate of users.',
|
||||
|
|
|
|||
|
|
@ -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