fix(striker-ui): rename to resetChecks

main
Tsu-ba-me 1 year ago
parent 47960b8565
commit 71729e3425
  1. 6
      striker-ui/components/ManageFence/ManageFencePanel.tsx
  2. 6
      striker-ui/components/ManageManifest/ManageManifestPanel.tsx
  3. 6
      striker-ui/hooks/useChecklist.tsx

@ -160,7 +160,7 @@ const ManageFencePanel: FC = () => {
checks,
getCheck,
hasChecks,
resetChecklist,
resetChecks,
setCheck,
} = useChecklist({ list: fenceOverviews });
@ -246,7 +246,7 @@ const ManageFencePanel: FC = () => {
method: 'delete',
onSuccess: () => {
getFenceOverviews();
resetChecklist();
resetChecks();
},
url: '/fence',
});
@ -382,7 +382,7 @@ const ManageFencePanel: FC = () => {
getFormSummaryEntryLabel,
hasChecks,
isEditFences,
resetChecklist,
resetChecks,
setCheck,
setConfirmDialogProps,
setFormDialogProps,

@ -217,7 +217,7 @@ const ManageManifestPanel: FC = () => {
checks,
getCheck,
hasChecks,
resetChecklist,
resetChecks,
setCheck,
} = useChecklist({
list: manifestOverviews,
@ -445,7 +445,7 @@ const ManageManifestPanel: FC = () => {
method: 'delete',
onSuccess: () => {
getManifestOverviews();
resetChecklist();
resetChecks();
},
url: `/manifest`,
});
@ -503,7 +503,7 @@ const ManageManifestPanel: FC = () => {
hasChecks,
isEditManifests,
manifestOverviews,
resetChecklist,
resetChecks,
setCheck,
setConfirmDialogProps,
setManifestDetail,

@ -16,7 +16,7 @@ const useChecklist = ({
hasAllChecks: boolean;
hasChecks: boolean;
multipleItems: boolean;
resetChecklist: () => void;
resetChecks: () => void;
setAllChecks: SetAllChecksFunction;
setCheck: SetCheckFunction;
} => {
@ -62,7 +62,7 @@ const useChecklist = ({
[checklist],
);
const resetChecklist = useCallback(() => setChecklist({}), []);
const resetChecks = useCallback(() => setChecklist({}), []);
const setAllChecks = useCallback<SetAllChecksFunction>(
(checked) =>
@ -92,7 +92,7 @@ const useChecklist = ({
hasAllChecks,
hasChecks,
multipleItems,
resetChecklist,
resetChecks,
setAllChecks,
setCheck,
};

Loading…
Cancel
Save