From cf1ca71d507118c2a97f868435cfd7ad529d965c Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Thu, 2 Jan 2025 08:53:54 +0700
Subject: <iman> update merchant

---
 src/pages/daftar-merchant.jsx | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

(limited to 'src/pages/daftar-merchant.jsx')

diff --git a/src/pages/daftar-merchant.jsx b/src/pages/daftar-merchant.jsx
index e1fa9bcb..c224ed0d 100644
--- a/src/pages/daftar-merchant.jsx
+++ b/src/pages/daftar-merchant.jsx
@@ -1,15 +1,19 @@
-import Seo from '@/core/components/Seo'
-import BasicLayout from '@/core/components/layouts/BasicLayout'
-import CreateMerchant from '@/lib/form/components/Merchant'
-
+import Seo from '@/core/components/Seo';
+import BasicLayout from '@/core/components/layouts/BasicLayout';
+import CreateMerchant from '@/lib/form/components/Merchant';
+import ErrorMerchant from '@/lib/form/components/AccountSwitch';
+import useAuth from '@/core/hooks/useAuth';
+import { useRouter } from 'next/router';
 export default function DaftarMerchant() {
+  const router = useRouter();
+  const auth = useAuth();
   return (
     <>
       <Seo title='Daftar Merchant - Indoteknik.com' />
 
       <BasicLayout>
-        <CreateMerchant></CreateMerchant>
+        {auth?.company ? <CreateMerchant></CreateMerchant> : <ErrorMerchant />}
       </BasicLayout>
     </>
-  )
+  );
 }
-- 
cgit v1.2.3

