fix(striker-ui): make checks an array of IDs

main
Tsu-ba-me 2 years ago
parent 911f0322cb
commit 46f299d878
  1. 2
      striker-ui/hooks/useChecklist.tsx
  2. 2
      striker-ui/types/Checklist.d.ts

@ -14,7 +14,7 @@ const useChecklist = (): {
} => {
const [checklist, setChecklist] = useState<Checklist>({});
const checks = useMemo(() => Object.entries(checklist), [checklist]);
const checks = useMemo(() => Object.keys(checklist), [checklist]);
const hasChecks = useMemo(() => checks.length > 0, [checks.length]);

@ -1,6 +1,6 @@
type Checklist = Record<string, boolean>;
type ArrayChecklist = [keyof Checklist, Checklist[string]][];
type ArrayChecklist = (keyof Checklist)[];
type BuildDeleteDialogPropsFunction = (args: {
confirmDialogProps?: Partial<Omit<ConfirmDialogProps, 'content'>>;

Loading…
Cancel
Save