From 69d9818cc0d374a96d644baf76e5904c18ab6969 Mon Sep 17 00:00:00 2001 From: David Colon <38386583+Da-Colon@users.noreply.github.com> Date: Fri, 29 Mar 2024 16:38:10 -0400 Subject: [PATCH] remove unneeded conditional --- src/hooks/utils/useCanUserSubmitProposal.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/hooks/utils/useCanUserSubmitProposal.ts b/src/hooks/utils/useCanUserSubmitProposal.ts index e3b0d1aebc..132aa0b6b9 100644 --- a/src/hooks/utils/useCanUserSubmitProposal.ts +++ b/src/hooks/utils/useCanUserSubmitProposal.ts @@ -96,10 +96,8 @@ export function useCanUserCreateProposal() { const loadCanUserCreateProposal = async () => { setCanUserCreateProposal(await getCanUserCreateProposal()); }; - if (canUserCreateProposal === undefined) { - loadCanUserCreateProposal(); - } - }, [getCanUserCreateProposal, canUserCreateProposal, user]); + loadCanUserCreateProposal(); + }, [getCanUserCreateProposal, canUserCreateProposal]); return { canUserCreateProposal, getCanUserCreateProposal }; }