Skip to content

Commit 5ce040d

Browse files
committed
chore: improve name of states
1 parent e3e5f6e commit 5ce040d

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

apps/web/src/routes/_app/dashboard.tsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ const RouteComponent = () => {
2424
const [theme] = useTheme();
2525
const summaryQuery = useSummaryQuery({ params: { groupId: currentGroup?.id } });
2626
const navigate = useNavigate();
27-
const [isLookupOpen, setIsLookupOpen] = useState(false);
28-
const [isUserLookupOpen, setIsUserLookupOpen] = useState(false);
29-
const [isRecordLookupOpen, setIsRecordLookupOpen] = useState(false);
27+
const [isInstrumentModalOpen, setIsInstrumentModalOpen] = useState(false);
28+
const [isUserModalOpen, setIsUserModalOpen] = useState(false);
29+
const [isRecordModalOpen, setIsRecordModalOpen] = useState(false);
3030
const instrumentInfoQuery = useInstrumentInfoQuery();
3131
const userInfoQuery = useUsersQuery();
3232

@@ -178,7 +178,7 @@ const RouteComponent = () => {
178178
className="group flex transform transition-all duration-300 hover:scale-105"
179179
data-testid="statistic-users"
180180
>
181-
<Dialog open={isUserLookupOpen} onOpenChange={setIsUserLookupOpen}>
181+
<Dialog open={isUserModalOpen} onOpenChange={setIsUserModalOpen}>
182182
<Dialog.Trigger className="grow">
183183
<StatisticCard
184184
icon={
@@ -191,7 +191,7 @@ const RouteComponent = () => {
191191
value={summaryQuery.data.counts.users}
192192
/>
193193
</Dialog.Trigger>
194-
<Dialog.Content data-spotlight-type="subject-lookup-modal" data-testid="datahub-subject-lookup-dialog">
194+
<Dialog.Content data-spotlight-type="subject-Modal-modal" data-testid="datahub-subject-Modal-dialog">
195195
<Dialog.Header>
196196
<Dialog.Title>
197197
{t({
@@ -248,7 +248,7 @@ const RouteComponent = () => {
248248
className="group flex transform transition-all duration-300 hover:scale-105"
249249
data-testid="statistic-instruments"
250250
>
251-
<Dialog open={isLookupOpen} onOpenChange={setIsLookupOpen}>
251+
<Dialog open={isInstrumentModalOpen} onOpenChange={setIsInstrumentModalOpen}>
252252
<Dialog.Trigger className="grow">
253253
<StatisticCard
254254
icon={
@@ -261,7 +261,7 @@ const RouteComponent = () => {
261261
value={summaryQuery.data.counts.instruments}
262262
></StatisticCard>
263263
</Dialog.Trigger>
264-
<Dialog.Content data-spotlight-type="subject-lookup-modal" data-testid="datahub-subject-lookup-dialog">
264+
<Dialog.Content data-spotlight-type="subject-Modal-modal" data-testid="datahub-subject-Modal-dialog">
265265
<Dialog.Header>
266266
<Dialog.Title>
267267
{t({
@@ -306,7 +306,7 @@ const RouteComponent = () => {
306306
className="group flex transform transition-all duration-300 hover:scale-105"
307307
data-testid="statistic-records"
308308
>
309-
<Dialog open={isRecordLookupOpen} onOpenChange={setIsRecordLookupOpen}>
309+
<Dialog open={isRecordModalOpen} onOpenChange={setIsRecordModalOpen}>
310310
<Dialog.Trigger className="grow">
311311
<StatisticCard
312312
icon={
@@ -319,7 +319,7 @@ const RouteComponent = () => {
319319
value={summaryQuery.data.counts.records}
320320
/>
321321
</Dialog.Trigger>
322-
<Dialog.Content data-spotlight-type="subject-lookup-modal" data-testid="datahub-subject-lookup-dialog">
322+
<Dialog.Content data-spotlight-type="subject-Modal-modal" data-testid="datahub-subject-Modal-dialog">
323323
<Dialog.Header>
324324
<Dialog.Title>
325325
{t({

0 commit comments

Comments
 (0)