Skip to content

Commit 42e68bf

Browse files
authored
fix: type dashboard chart metric keys (#380)
1 parent 4307670 commit 42e68bf

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

apps/web/src/app/(dashboard)/dashboard/email-chart.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ interface EmailChartProps {
2323
domain: string | null;
2424
}
2525

26-
const STACK_ORDER: string[] = [
26+
const STACK_ORDER = [
2727
"delivered",
2828
"bounced",
2929
"complained",
@@ -74,9 +74,9 @@ export default function EmailChart({ days, domain }: EmailChartProps) {
7474
clicked: { label: "Clicked", color: currentColors.clicked },
7575
};
7676

77-
const visibleMetrics =
77+
const visibleMetrics: StackKey[] =
7878
selectedMetrics.length === 0
79-
? STACK_ORDER
79+
? [...STACK_ORDER]
8080
: STACK_ORDER.filter((key) => selectedMetrics.includes(key));
8181

8282
const toggleMetric = (metric: StackKey) => {

0 commit comments

Comments
 (0)