remove listable currency implementation. use formatCount

This commit is contained in:
Francis Cao committed 2026-03-05 12:52:04 -08:00
1 parent 9d72f8803a
commit 72bb63fe5e
4 files changed
+8 -19

No files matched your search

+1 -1
View File
@@ -134,7 +134,7 @@ export function SideNav(props: any) {
</Column>
)}
</Column>
<Row marginBottom="4" style={{ flexShrink: 0 }}>
<Row marginBottom="4" paddingTop="2">
<UserButton showText={!isCollapsed} />
</Row>
</Column>
@@ -16,7 +16,6 @@ export interface AttributionProps {
model: string;
type: string;
step: string;
currency?: string;
}
export function Attribution({
@@ -26,7 +25,6 @@ export function Attribution({
model,
type,
step,
currency,
}: AttributionProps) {
const { data, error, isLoading } = useResultQuery<any>('attribution', {
websiteId,
@@ -72,8 +70,7 @@ export function Attribution({
return (
<ListTable
title={title}
metric={t(currency ? labels.revenue : labels.visitors)}
currency={currency}
metric={t(labels.visitors)}
data={attributionData.map(({ x, y, z }: { x: string; y: number; z: number }) => ({
label: x,
count: y,
@@ -133,7 +133,7 @@ export function Revenue({ websiteId, startDate, endDate, unit }: RevenueProps) {
percent: (value / data?.total.sum) * 100,
}),
)}
currency={currency}
formatCount={(n: number) => formatLongCurrency(n, currency)}
renderLabel={renderLabel('referrer')}
/>
</TabPanel>
@@ -148,7 +148,7 @@ export function Revenue({ websiteId, startDate, endDate, unit }: RevenueProps) {
percent: (value / data?.total.sum) * 100,
}),
)}
currency={currency}
formatCount={(n: number) => formatLongCurrency(n, currency)}
renderLabel={renderLabel('channel')}
/>
</TabPanel>
@@ -172,7 +172,7 @@ export function Revenue({ websiteId, startDate, endDate, unit }: RevenueProps) {
percent: (value / data?.total.sum) * 100,
}),
)}
currency={currency}
formatCount={(n: number) => formatLongCurrency(n, currency)}
renderLabel={renderLabel('country')}
/>
</TabPanel>
@@ -196,7 +196,7 @@ export function Revenue({ websiteId, startDate, endDate, unit }: RevenueProps) {
percent: (value / data?.total.sum) * 100,
}),
)}
currency={currency}
formatCount={(n: number) => formatLongCurrency(n, currency)}
renderLabel={renderLabel('region')}
/>
</TabPanel>