Pair checkboxes and fix twig indent

This commit is contained in:
Gregory Schier
2023-03-20 00:03:33 -07:00
parent ae65f222bc
commit 90294fbb5d
23 changed files with 286 additions and 115 deletions

View File

@@ -1,5 +1,5 @@
import classnames from 'classnames';
import { useMemo } from 'react';
import { useCallback, useMemo } from 'react';
import { useNavigate } from 'react-router-dom';
import { useActiveWorkspace } from '../hooks/useActiveWorkspace';
import { useCreateWorkspace } from '../hooks/useCreateWorkspace';
@@ -24,7 +24,10 @@ export function WorkspaceDropdown({ className }: Props) {
label: w.name,
value: w.id,
leftSlot: activeWorkspace?.id === w.id ? <Icon icon="check" /> : <Icon icon="empty" />,
onSelect: () => navigate(`/workspaces/${w.id}`),
onSelect: () => {
if (w.id === activeWorkspace?.id) return;
navigate(`/workspaces/${w.id}`);
},
}));
return [