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/index.jsx | 53 -------------------------------------
 1 file changed, 53 deletions(-)
 delete mode 100644 src/pages/daftar-merchant/index.jsx

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

diff --git a/src/pages/daftar-merchant/index.jsx b/src/pages/daftar-merchant/index.jsx
deleted file mode 100644
index 36fedafc..00000000
--- a/src/pages/daftar-merchant/index.jsx
+++ /dev/null
@@ -1,53 +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 getMerchantProgresApi from '@/lib/merchant/api/getMerchantProgresApi';
-import useAuth from '@/core/hooks/useAuth';
-import { useRouter } from 'next/router';
-import React, { useEffect, useState } from 'react';
-export default function DaftarMerchant() {
-  const router = useRouter();
-  const auth = useAuth();
-  const [isLoading, setIsLoading] = useState(true);
-  useEffect(() => {
-    const loadData = async () => {
-      setIsLoading(true);
-      try {
-        const data = await getMerchantProgresApi();
-        switch (data) {
-          case 'draft':
-            router.push(`/daftar-merchant/review`);
-            break;
-          case 'approve':
-            router.push(`/daftar-merchant/approve`);
-            break;
-          case 'reject':
-            router.push(`/daftar-merchant/reject`);
-            break;
-        }
-      } catch (error) {
-        console.error('Error loading profile:', error);
-        handleIsError(true); // Jika ada error, panggil fungsi error handler
-      }
-      setIsLoading(false);
-    };
-
-    loadData();
-  }, []);
-  if (auth == false) {
-    router.push(`/login?next=${encodeURIComponent('/daftar-merchant')}`);
-  }
-  if (!auth || isLoading) {
-    return;
-  }
-  return (
-    <>
-      <Seo title='Daftar Merchant - Indoteknik.com' />
-
-      <BasicLayout>
-        {auth && auth?.company ? <CreateMerchant /> : <ErrorMerchant />}
-      </BasicLayout>
-    </>
-  );
-}
-- 
cgit v1.2.3

