blob: 8616cc46f61aa406a4e30724aca46e26dae8a2e4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
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();
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>
</>
);
}
|