diff --git a/striker-ui/components/ManageFence/ManageFencePanel.tsx b/striker-ui/components/ManageFence/ManageFencePanel.tsx index 4bef8a18..a121a5b1 100644 --- a/striker-ui/components/ManageFence/ManageFencePanel.tsx +++ b/striker-ui/components/ManageFence/ManageFencePanel.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, diff --git a/striker-ui/components/ManageManifest/ManageManifestPanel.tsx b/striker-ui/components/ManageManifest/ManageManifestPanel.tsx index 40412546..3807454c 100644 --- a/striker-ui/components/ManageManifest/ManageManifestPanel.tsx +++ b/striker-ui/components/ManageManifest/ManageManifestPanel.tsx @@ -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, diff --git a/striker-ui/hooks/useChecklist.tsx b/striker-ui/hooks/useChecklist.tsx index cf71bcdf..3d9fb02d 100644 --- a/striker-ui/hooks/useChecklist.tsx +++ b/striker-ui/hooks/useChecklist.tsx @@ -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( (checked) => @@ -92,7 +92,7 @@ const useChecklist = ({ hasAllChecks, hasChecks, multipleItems, - resetChecklist, + resetChecks, setAllChecks, setCheck, };