From 2e38ec15d42201c26c48f9bcf856750204db0582 Mon Sep 17 00:00:00 2001
From: "HATEC\\SPVDEV001" <tri.susilo@altama.co.id>
Date: Fri, 9 Feb 2024 10:19:28 +0700
Subject: fixing error form form sales

---
 src/lib/form/components/SuratDukungan.jsx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'src/lib/form/components/SuratDukungan.jsx')

diff --git a/src/lib/form/components/SuratDukungan.jsx b/src/lib/form/components/SuratDukungan.jsx
index 0b3b650e..31e7ee83 100644
--- a/src/lib/form/components/SuratDukungan.jsx
+++ b/src/lib/form/components/SuratDukungan.jsx
@@ -33,7 +33,7 @@ const CreateSuratDukungan = () => {
   const auth = useAuth()
 
   useEffect(() => {
-    if(!auth) {
+    if(auth == false) {
       router.push('/login')
     }
     const loadCities = async () => {
@@ -45,7 +45,7 @@ const CreateSuratDukungan = () => {
       setCities(dataCities);
     };
     loadCities();
-  }, []);
+  }, [auth]);
 
   const onSubmitHandler = async (values) => {
     const recaptchaValue = recaptchaRef.current.getValue();
-- 
cgit v1.2.3

