From 360498a3dd90cebffb0911d6eed32ef29299869b Mon Sep 17 00:00:00 2001 From: it-fixcomart Date: Thu, 2 Jan 2025 10:26:45 +0700 Subject: update merchant --- src/lib/form/components/Merchant.jsx | 2 -- src/pages/daftar-merchant.jsx | 12 +++++++++++- 2 files changed, 11 insertions(+), 3 deletions(-) (limited to 'src') 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 ( <> - {auth?.company ? : } + {auth && auth?.company ? ( + + ) : ( + + )} ); -- cgit v1.2.3