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


From 360498a3dd90cebffb0911d6eed32ef29299869b Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Thu, 2 Jan 2025 10:26:45 +0700
Subject: <iman> update merchant

---
 src/pages/daftar-merchant.jsx | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

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

diff --git a/src/pages/daftar-merchant.jsx b/src/pages/daftar-merchant.jsx
index c224ed0d..8616cc46 100644
--- a/src/pages/daftar-merchant.jsx
+++ b/src/pages/daftar-merchant.jsx
@@ -7,12 +7,22 @@ import { useRouter } from 'next/router';
 export default function DaftarMerchant() {
   const router = useRouter();
   const auth = useAuth();
+  if (auth == false) {
+    router.push(`/login?next=${encodeURIComponent('/daftar-merchant')}`);
+  }
+  if (!auth) {
+    return;
+  }
   return (
     <>
       <Seo title='Daftar Merchant - Indoteknik.com' />
 
       <BasicLayout>
-        {auth?.company ? <CreateMerchant></CreateMerchant> : <ErrorMerchant />}
+        {auth && auth?.company ? (
+          <CreateMerchant></CreateMerchant>
+        ) : (
+          <ErrorMerchant />
+        )}
       </BasicLayout>
     </>
   );
-- 
cgit v1.2.3


From e1ecdbe5dd1857d1aa2f3317c0d763241ebaa6e5 Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Thu, 9 Jan 2025 17:09:17 +0700
Subject: <iman> update code

---
 src/pages/daftar-merchant.jsx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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

diff --git a/src/pages/daftar-merchant.jsx b/src/pages/daftar-merchant.jsx
index 8616cc46..b51589e8 100644
--- a/src/pages/daftar-merchant.jsx
+++ b/src/pages/daftar-merchant.jsx
@@ -1,7 +1,7 @@
 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 CreateMerchant from '@/lib/merchant/components/Merchant';
+import ErrorMerchant from '@/lib/merchant/components/AccountSwitch';
 import useAuth from '@/core/hooks/useAuth';
 import { useRouter } from 'next/router';
 export default function DaftarMerchant() {
-- 
cgit v1.2.3


From 4a23d0c7c880b67d571ca34efe93cbf2c1bba721 Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Wed, 22 Jan 2025 13:16:05 +0700
Subject: <iman> update merchant

---
 src/pages/daftar-merchant.jsx | 29 -----------------------------
 1 file changed, 29 deletions(-)
 delete mode 100644 src/pages/daftar-merchant.jsx

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

diff --git a/src/pages/daftar-merchant.jsx b/src/pages/daftar-merchant.jsx
deleted file mode 100644
index b51589e8..00000000
--- a/src/pages/daftar-merchant.jsx
+++ /dev/null
@@ -1,29 +0,0 @@
-import Seo from '@/core/components/Seo';
-import BasicLayout from '@/core/components/layouts/BasicLayout';
-import CreateMerchant from '@/lib/merchant/components/Merchant';
-import ErrorMerchant from '@/lib/merchant/components/AccountSwitch';
-import useAuth from '@/core/hooks/useAuth';
-import { useRouter } from 'next/router';
-export default function DaftarMerchant() {
-  const router = useRouter();
-  const auth = useAuth();
-  if (auth == false) {
-    router.push(`/login?next=${encodeURIComponent('/daftar-merchant')}`);
-  }
-  if (!auth) {
-    return;
-  }
-  return (
-    <>
-      <Seo title='Daftar Merchant - Indoteknik.com' />
-
-      <BasicLayout>
-        {auth && auth?.company ? (
-          <CreateMerchant></CreateMerchant>
-        ) : (
-          <ErrorMerchant />
-        )}
-      </BasicLayout>
-    </>
-  );
-}
-- 
cgit v1.2.3


From 3d91a6e1ac168d0749cd816c1ea99b44336ffa0c Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Mon, 26 May 2025 16:20:09 +0700
Subject: <fix merchant>

---
 src/pages/daftar-merchant.jsx | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
 create mode 100644 src/pages/daftar-merchant.jsx

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

diff --git a/src/pages/daftar-merchant.jsx b/src/pages/daftar-merchant.jsx
new file mode 100644
index 00000000..945a0060
--- /dev/null
+++ b/src/pages/daftar-merchant.jsx
@@ -0,0 +1,15 @@
+import Seo from '@/core/components/Seo'
+import BasicLayout from '@/core/components/layouts/BasicLayout'
+import CreateMerchant from '@/lib/form/components/Merchant'
+
+export default function DaftarMerchant() {
+  return (
+    <>
+      <Seo title='Daftar Merchant - Indoteknik.com' />
+
+      <BasicLayout>
+        <CreateMerchant></CreateMerchant>
+      </BasicLayout>
+    </>
+  )
+}
\ No newline at end of file
-- 
cgit v1.2.3

