mirror of
https://github.com/umami-software/umami.git
synced 2026-02-07 06:07:17 +01:00
add missing import
This commit is contained in:
parent
8d3aad8454
commit
7a0765fb4b
3 changed files with 192 additions and 242 deletions
|
|
@ -6,8 +6,9 @@ import GoalReport from '../goals/GoalsReport';
|
|||
import InsightsReport from '../insights/InsightsReport';
|
||||
import JourneyReport from '../journey/JourneyReport';
|
||||
import RetentionReport from '../retention/RetentionReport';
|
||||
import UTMReport from '../utm/UTMReport';
|
||||
import RevenueReport from '../revenue/RevenueReport';
|
||||
import UTMReport from '../utm/UTMReport';
|
||||
import AttributionReport from '../attribution/AttributionReport';
|
||||
|
||||
const reports = {
|
||||
funnel: FunnelReport,
|
||||
|
|
@ -18,6 +19,7 @@ const reports = {
|
|||
goals: GoalReport,
|
||||
journey: JourneyReport,
|
||||
revenue: RevenueReport,
|
||||
attribution: AttributionReport,
|
||||
};
|
||||
|
||||
export default function ReportPage({ reportId }: { reportId: string }) {
|
||||
|
|
|
|||
|
|
@ -1,38 +0,0 @@
|
|||
import EmptyPlaceholder from '@/components/common/EmptyPlaceholder';
|
||||
import { useMessages } from '@/components/hooks';
|
||||
import { useContext } from 'react';
|
||||
import { GridColumn, GridTable } from 'react-basics';
|
||||
import { ReportContext } from '../[reportId]/Report';
|
||||
import { formatLongCurrency } from '@/lib/format';
|
||||
|
||||
export function AttributionTable() {
|
||||
const { report } = useContext(ReportContext);
|
||||
const { formatMessage, labels } = useMessages();
|
||||
const { data } = report || {};
|
||||
|
||||
if (!data) {
|
||||
return <EmptyPlaceholder />;
|
||||
}
|
||||
|
||||
return (
|
||||
<GridTable data={data.table || []}>
|
||||
<GridColumn name="currency" label={formatMessage(labels.currency)} alignment="end">
|
||||
{row => row.currency}
|
||||
</GridColumn>
|
||||
<GridColumn name="currency" label={formatMessage(labels.total)} width="300px" alignment="end">
|
||||
{row => formatLongCurrency(row.sum, row.currency)}
|
||||
</GridColumn>
|
||||
<GridColumn name="currency" label={formatMessage(labels.average)} alignment="end">
|
||||
{row => formatLongCurrency(row.count ? row.sum / row.count : 0, row.currency)}
|
||||
</GridColumn>
|
||||
<GridColumn name="currency" label={formatMessage(labels.transactions)} alignment="end">
|
||||
{row => row.count}
|
||||
</GridColumn>
|
||||
<GridColumn name="currency" label={formatMessage(labels.uniqueCustomers)} alignment="end">
|
||||
{row => row.unique_count}
|
||||
</GridColumn>
|
||||
</GridTable>
|
||||
);
|
||||
}
|
||||
|
||||
export default AttributionTable;
|
||||
Loading…
Add table
Add a link
Reference in a new issue