blob: 8ea6cfd1079aaa8b7c0bb13e36a81899b69645b3 (
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
|
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 /> : <ErrorMerchant />}
</BasicLayout>
</>
);
}
|