summaryrefslogtreecommitdiff
path: root/src/lib/form/components/Merchant.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/form/components/Merchant.jsx')
-rw-r--r--src/lib/form/components/Merchant.jsx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/form/components/Merchant.jsx b/src/lib/form/components/Merchant.jsx
index 770bfb82..85f72bf8 100644
--- a/src/lib/form/components/Merchant.jsx
+++ b/src/lib/form/components/Merchant.jsx
@@ -58,7 +58,7 @@ const CreateMerchant = () => {
const auth = useAuth()
useEffect(() => {
- if(!auth) {
+ if(auth == false) {
router.push('/login')
}
const loadCities = async () => {
@@ -70,7 +70,7 @@ const CreateMerchant = () => {
setCities(dataCities);
};
loadCities();
- }, []);
+ }, [auth]);
const onSubmitHandler = async (values) => {
const recaptchaValue = recaptchaRef.current.getValue();