From 71729e3425e06b41edc38c80717a0bdd00d0563b Mon Sep 17 00:00:00 2001 From: Tsu-ba-me Date: Wed, 6 Dec 2023 12:06:29 -0500 Subject: [PATCH] fix(striker-ui): rename to resetChecks --- striker-ui/components/ManageFence/ManageFencePanel.tsx | 6 +++--- .../components/ManageManifest/ManageManifestPanel.tsx | 6 +++--- striker-ui/hooks/useChecklist.tsx | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) 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, };