diff options
| author | it-fixcomart <it@fixcomart.co.id> | 2025-01-02 10:26:45 +0700 |
|---|---|---|
| committer | it-fixcomart <it@fixcomart.co.id> | 2025-01-02 10:26:45 +0700 |
| commit | 360498a3dd90cebffb0911d6eed32ef29299869b (patch) | |
| tree | b27f2167f478364e1867905edae02144db4fc11a | |
| parent | cf1ca71d507118c2a97f868435cfd7ad529d965c (diff) | |
<iman> update merchant
| -rw-r--r-- | src/lib/form/components/Merchant.jsx | 2 | ||||
| -rw-r--r-- | src/pages/daftar-merchant.jsx | 12 |
2 files changed, 11 insertions, 3 deletions
diff --git a/src/lib/form/components/Merchant.jsx b/src/lib/form/components/Merchant.jsx index adb34671..742c994d 100644 --- a/src/lib/form/components/Merchant.jsx +++ b/src/lib/form/components/Merchant.jsx @@ -297,8 +297,6 @@ const CreateMerchant = () => { values.address + ' \r\n Kota : ' + values.city + - ' \r\n Unit Perusahaan : ' + - values.company_unit + ' \r\n Telepon: ' + values.phone + ' \r\n Email : ' + 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> </> ); |
