Skip to content

Commit d5aaba1

Browse files
committed
Show a checkmark on the selected dashboard when choosing from the modal
1 parent 98e715e commit d5aaba1

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

apps/webapp/app/components/metrics/SaveToDashboardDialog.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { DialogClose } from "@radix-ui/react-dialog";
22
import { useFetcher, useNavigate } from "@remix-run/react";
3-
import { IconChartHistogram } from "@tabler/icons-react";
3+
import { IconCheck } from "@tabler/icons-react";
44
import { useEffect, useState } from "react";
55
import { useEnvironment } from "~/hooks/useEnvironment";
66
import {
@@ -138,7 +138,11 @@ export function SaveToDashboardDialog({
138138
: "text-text-dimmed hover:bg-charcoal-750 hover:text-text-bright"
139139
)}
140140
>
141-
<IconChartHistogram className="size-4 shrink-0 text-text-dimmed" />
141+
{selectedDashboardId === dashboard.friendlyId ? (
142+
<IconCheck className="size-4 shrink-0 text-green-500" />
143+
) : (
144+
<span className="size-4 shrink-0" />
145+
)}
142146
<span className="flex-1 truncate">{dashboard.title}</span>
143147
<span
144148
className={cn(

0 commit comments

Comments
 (0)