summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/components/elements/Footer/BasicFooter.jsx269
-rw-r--r--src/core/components/layouts/AppLayout.jsx2
-rw-r--r--src/core/components/layouts/BasicLayout.jsx2
-rw-r--r--src/lib/auth/components/IsAuth.jsx20
-rw-r--r--src/lib/home/components/PreferredBrand.jsx2
-rw-r--r--src/pages/my/address/[id]/edit.jsx15
-rw-r--r--src/pages/my/address/create.jsx9
-rw-r--r--src/pages/my/address/index.jsx9
-rw-r--r--src/pages/my/invoice/[id].jsx9
-rw-r--r--src/pages/my/invoices.jsx9
-rw-r--r--src/pages/my/menu.jsx91
-rw-r--r--src/pages/my/profile.jsx13
-rw-r--r--src/pages/my/transaction/[id].jsx9
-rw-r--r--src/pages/my/transactions.jsx9
-rw-r--r--src/pages/my/wishlist.jsx9
-rw-r--r--src/pages/shop/checkout/finish.jsx9
-rw-r--r--src/pages/shop/checkout/index.jsx9
-rw-r--r--src/pages/shop/quotation/finish.jsx59
-rw-r--r--src/pages/shop/quotation/index.jsx9
19 files changed, 449 insertions, 114 deletions
diff --git a/src/core/components/elements/Footer/BasicFooter.jsx b/src/core/components/elements/Footer/BasicFooter.jsx
new file mode 100644
index 00000000..2831d4d6
--- /dev/null
+++ b/src/core/components/elements/Footer/BasicFooter.jsx
@@ -0,0 +1,269 @@
+import NextImage from 'next/image'
+import IndoteknikLogo from '@/images/logo.png'
+import {
+ DevicePhoneMobileIcon,
+ EnvelopeIcon,
+ MapPinIcon,
+ PhoneArrowUpRightIcon
+} from '@heroicons/react/24/outline'
+import Link from '../Link/Link'
+
+const BasicFooter = () => {
+ return (
+ <footer className='flex flex-wrap p-4 bg-gray_r-3 text-caption-1'>
+ <div className='w-1/2 flex flex-col gap-y-4 pr-1.5'>
+ <div>
+ <NextImage
+ src={IndoteknikLogo}
+ alt='Logo Indoteknik'
+ width={90}
+ height={30}
+ />
+
+ <div className='font-semibold mt-2'>PT. Indoteknik Dotcom Gemilang</div>
+ </div>
+
+ <OfficeLocation />
+ <WarehouseLocation />
+ <InformationCenter />
+ <OpenHours />
+ <SocialMedias />
+ </div>
+
+ <div className='w-1/2 flex flex-col gap-y-4 pl-1.5'>
+ <AboutUs />
+ <CustomerGuide />
+ <Payments />
+ </div>
+
+ <div className='w-full mt-4 leading-5 text-caption-2 text-gray_r-12/80'>
+ Copyright © 2007 - 2022, PT. Indoteknik Dotcom Gemilang
+ </div>
+ </footer>
+ )
+}
+
+const headerClassName = 'font-semibold mb-2'
+
+const OfficeLocation = () => (
+ <div>
+ <div className={headerClassName}>Kantor Pusat</div>
+ <div className='leading-6 text-gray_r-12/80'>
+ Jl. Bandengan Utara 85A No. 8-9 RT.3/RW.16, Penjaringan, Kec. Penjaringan, Jakarta Utara
+ </div>
+ </div>
+)
+
+const WarehouseLocation = () => (
+ <div>
+ <div className={headerClassName}>Gudang Indoteknik</div>
+ <div className='leading-6 text-gray_r-12/80'>
+ Jl. Bandengan Utara Komp. 85 A dan B, Penjaringan, Kec. Penjaringan, Jakarta Utara
+ </div>
+ </div>
+)
+
+const AboutUs = () => (
+ <div>
+ <div className={`${headerClassName} mb-3`}>Tentang Kami</div>
+ <ul className='flex flex-col gap-y-2'>
+ <li>
+ <InternalItemLink href='/'>Company Profile</InternalItemLink>
+ </li>
+ <li>
+ <InternalItemLink href='/'>Karir</InternalItemLink>
+ </li>
+ <li>
+ <InternalItemLink href='/'>Pelanggan Kami</InternalItemLink>
+ </li>
+ <li>
+ <InternalItemLink href='/'>Menjadi Supplier</InternalItemLink>
+ </li>
+ <li>
+ <InternalItemLink href='/'>Garansi dan Pengembalian</InternalItemLink>
+ </li>
+ <li>
+ <InternalItemLink href='/'>Metode Pembayaran</InternalItemLink>
+ </li>
+ <li>
+ <InternalItemLink href='/'>Metode Pengiriman</InternalItemLink>
+ </li>
+ <li>
+ <InternalItemLink href='/'>Testimonial</InternalItemLink>
+ </li>
+ <li>
+ <InternalItemLink href='/'>Kebijakan Privacy</InternalItemLink>
+ </li>
+ </ul>
+ </div>
+)
+
+const CustomerGuide = () => (
+ <div>
+ <div className={`${headerClassName} mb-3`}>Panduan Pelanggan</div>
+ <ul className='flex flex-col gap-y-2'>
+ <li>
+ <InternalItemLink href='/'>Panduan Belanja</InternalItemLink>
+ </li>
+ <li>
+ <InternalItemLink href='/'>F.A.Q</InternalItemLink>
+ </li>
+ <li>
+ <InternalItemLink href='/'>Kebijakan Privasi</InternalItemLink>
+ </li>
+ <li>
+ <InternalItemLink href='/'>Pengajuan Tempo</InternalItemLink>
+ </li>
+ <li>
+ <InternalItemLink href='/'>Garansi Produk</InternalItemLink>
+ </li>
+ <li>
+ <InternalItemLink href='/'>Online Quotation</InternalItemLink>
+ </li>
+ <li>
+ <InternalItemLink href='/'>Pengiriman</InternalItemLink>
+ </li>
+ <li>
+ <InternalItemLink href='/'>Pembayaran</InternalItemLink>
+ </li>
+ <li>
+ <InternalItemLink href='/'>Syarat & Ketentuan</InternalItemLink>
+ </li>
+ </ul>
+ </div>
+)
+
+const InformationCenter = () => (
+ <div>
+ <div className={`${headerClassName} mb-3`}>Layanan Informasi</div>
+ <ul className='flex flex-col gap-y-2'>
+ <li className='text-gray_r-12/80 flex'>
+ <PhoneArrowUpRightIcon className='w-[18px] mr-2' />
+ <a href='tel:02129338828'>(021) 2933-8828 / 29</a>
+ </li>
+ <li className='text-gray_r-12/80 flex'>
+ <EnvelopeIcon className='w-[18px] mr-2' />
+ <a href='mailto:sales@indoteknik.com'>sales@indoteknik.com</a>
+ </li>
+ <li className='text-gray_r-12/80 flex'>
+ <DevicePhoneMobileIcon className='w-[18px] mr-2' />
+ <a href='https://wa.me/+628128080622'>0812-8080-622</a>
+ </li>
+ </ul>
+ </div>
+)
+
+const OpenHours = () => (
+ <div>
+ <div className={headerClassName}>Jam Operasional</div>
+ <ul className='flex flex-col gap-y-1'>
+ <li>
+ <div className='text-gray_r-12'>Senin - Jumat:</div>
+ <div className='text-gray_r-12/80'>08:30 - 17:00</div>
+ </li>
+ <li>
+ <div className='text-gray_r-12'>Sabtu:</div>
+ <div className='text-gray_r-12/80'>08:30 - 14:00</div>
+ </li>
+ </ul>
+ </div>
+)
+
+const SocialMedias = () => (
+ <div>
+ <div className={headerClassName}>Temukan Kami</div>
+ <div className='flex flex-wrap gap-2'>
+ <NextImage
+ src='/images/socials/Whatsapp.png'
+ alt='Whatsapp Logo'
+ width={24}
+ height={24}
+ />
+ <NextImage
+ src='/images/socials/Facebook.png'
+ alt='Facebook Logo'
+ width={24}
+ height={24}
+ />
+ <NextImage
+ src='/images/socials/Twitter.png'
+ alt='Twitter Logo'
+ width={24}
+ height={24}
+ />
+ <NextImage
+ src='/images/socials/Linkedin.png'
+ alt='Linkedin Logo'
+ width={24}
+ height={24}
+ />
+ </div>
+ </div>
+)
+
+const Payments = () => (
+ <div>
+ <div className={headerClassName}>Pembayaran</div>
+ <div className='flex flex-wrap gap-2'>
+ <NextImage
+ src='/images/payments/bca.png'
+ alt='Bank BCA Logo'
+ width={48}
+ height={24}
+ />
+ <NextImage
+ src='/images/payments/bni.png'
+ alt='Bank BNI Logo'
+ width={48}
+ height={24}
+ />
+ <NextImage
+ src='/images/payments/bri.png'
+ alt='Bank BRI Logo'
+ width={48}
+ height={24}
+ />
+ <NextImage
+ src='/images/payments/gopay.png'
+ alt='Gopay Logo'
+ width={48}
+ height={24}
+ />
+ <NextImage
+ src='/images/payments/mandiri.png'
+ alt='Bank Mandiri Logo'
+ width={48}
+ height={24}
+ />
+ <NextImage
+ src='/images/payments/mastercard.png'
+ alt='Mastercard Logo'
+ width={48}
+ height={24}
+ />
+ <NextImage
+ src='/images/payments/permata.png'
+ alt='Bank Permata Logo'
+ width={48}
+ height={24}
+ />
+ <NextImage
+ src='/images/payments/visa.png'
+ alt='Visa Logo'
+ width={48}
+ height={24}
+ />
+ </div>
+ </div>
+)
+
+const InternalItemLink = ({ href, children }) => (
+ <Link
+ href={href}
+ className='!text-gray_r-12/80 font-normal line-clamp-1'
+ >
+ {children}
+ </Link>
+)
+
+export default BasicFooter
diff --git a/src/core/components/layouts/AppLayout.jsx b/src/core/components/layouts/AppLayout.jsx
index 3e3c8ee5..006c47c7 100644
--- a/src/core/components/layouts/AppLayout.jsx
+++ b/src/core/components/layouts/AppLayout.jsx
@@ -1,4 +1,5 @@
import AppBar from '../elements/Appbar/Appbar'
+import BasicFooter from '../elements/Footer/BasicFooter'
import AnimationLayout from './AnimationLayout'
const AppLayout = ({ children, title }) => {
@@ -7,6 +8,7 @@ const AppLayout = ({ children, title }) => {
<AnimationLayout>
<AppBar title={title} />
{children}
+ <BasicFooter />
</AnimationLayout>
</>
)
diff --git a/src/core/components/layouts/BasicLayout.jsx b/src/core/components/layouts/BasicLayout.jsx
index 6f176737..1a7185cd 100644
--- a/src/core/components/layouts/BasicLayout.jsx
+++ b/src/core/components/layouts/BasicLayout.jsx
@@ -1,4 +1,5 @@
import dynamic from 'next/dynamic'
+import BasicFooter from '../elements/Footer/BasicFooter'
const Navbar = dynamic(() => import('../elements/Navbar/Navbar'))
const AnimationLayout = dynamic(() => import('./AnimationLayout'))
@@ -8,6 +9,7 @@ const BasicLayout = ({ children }) => {
<>
<Navbar />
<AnimationLayout>{children}</AnimationLayout>
+ <BasicFooter />
</>
)
}
diff --git a/src/lib/auth/components/IsAuth.jsx b/src/lib/auth/components/IsAuth.jsx
new file mode 100644
index 00000000..1cfd3172
--- /dev/null
+++ b/src/lib/auth/components/IsAuth.jsx
@@ -0,0 +1,20 @@
+import { useRouter } from 'next/router'
+import { useEffect, useState } from 'react'
+import { getAuth } from '@/core/utils/auth'
+
+const IsAuth = ({ children }) => {
+ const router = useRouter()
+ const [response, setResponse] = useState(<></>)
+
+ useEffect(() => {
+ if (!getAuth()) {
+ router.replace('/login')
+ } else {
+ setResponse(children)
+ }
+ }, [children, router])
+
+ return response
+}
+
+export default IsAuth
diff --git a/src/lib/home/components/PreferredBrand.jsx b/src/lib/home/components/PreferredBrand.jsx
index fa0fdd0d..3df3cdb7 100644
--- a/src/lib/home/components/PreferredBrand.jsx
+++ b/src/lib/home/components/PreferredBrand.jsx
@@ -13,7 +13,7 @@ const PreferredBrand = () => {
{!preferredBrands.isLoading && (
<Swiper
slidesPerView={3.5}
- spaceBetween={8}
+ spaceBetween={12}
freeMode
>
{preferredBrands.data?.manufactures.map((brand) => (
diff --git a/src/pages/my/address/[id]/edit.jsx b/src/pages/my/address/[id]/edit.jsx
index 65d7cf9b..bc5f3471 100644
--- a/src/pages/my/address/[id]/edit.jsx
+++ b/src/pages/my/address/[id]/edit.jsx
@@ -1,15 +1,18 @@
import AppLayout from '@/core/components/layouts/AppLayout'
import addressApi from '@/lib/address/api/addressApi'
import EditAddressComponent from '@/lib/address/components/EditAddress'
+import IsAuth from '@/lib/auth/components/IsAuth'
export default function EditAddress({ id, defaultValues }) {
return (
- <AppLayout title='Ubah Alamat'>
- <EditAddressComponent
- id={id}
- defaultValues={defaultValues}
- />
- </AppLayout>
+ <IsAuth>
+ <AppLayout title='Ubah Alamat'>
+ <EditAddressComponent
+ id={id}
+ defaultValues={defaultValues}
+ />
+ </AppLayout>
+ </IsAuth>
)
}
diff --git a/src/pages/my/address/create.jsx b/src/pages/my/address/create.jsx
index ee905ee0..ec17f987 100644
--- a/src/pages/my/address/create.jsx
+++ b/src/pages/my/address/create.jsx
@@ -1,10 +1,13 @@
import AppLayout from '@/core/components/layouts/AppLayout'
import CreateAddressComponent from '@/lib/address/components/CreateAddress'
+import IsAuth from '@/lib/auth/components/IsAuth'
export default function CreateAddress() {
return (
- <AppLayout title='Tambah Alamat'>
- <CreateAddressComponent />
- </AppLayout>
+ <IsAuth>
+ <AppLayout title='Tambah Alamat'>
+ <CreateAddressComponent />
+ </AppLayout>
+ </IsAuth>
)
}
diff --git a/src/pages/my/address/index.jsx b/src/pages/my/address/index.jsx
index 46a7075c..93ed40b0 100644
--- a/src/pages/my/address/index.jsx
+++ b/src/pages/my/address/index.jsx
@@ -1,10 +1,13 @@
import AppLayout from '@/core/components/layouts/AppLayout'
import AddressesComponent from '@/lib/address/components/Addresses'
+import IsAuth from '@/lib/auth/components/IsAuth'
export default function Addresses() {
return (
- <AppLayout title='Daftar Alamat'>
- <AddressesComponent />
- </AppLayout>
+ <IsAuth>
+ <AppLayout title='Daftar Alamat'>
+ <AddressesComponent />
+ </AppLayout>
+ </IsAuth>
)
}
diff --git a/src/pages/my/invoice/[id].jsx b/src/pages/my/invoice/[id].jsx
index 0d409878..4938d8f8 100644
--- a/src/pages/my/invoice/[id].jsx
+++ b/src/pages/my/invoice/[id].jsx
@@ -1,4 +1,5 @@
import AppLayout from '@/core/components/layouts/AppLayout'
+import IsAuth from '@/lib/auth/components/IsAuth'
import InvoiceComponent from '@/lib/invoice/components/Invoice'
import { useRouter } from 'next/router'
@@ -6,8 +7,10 @@ export default function Invoice() {
const router = useRouter()
return (
- <AppLayout title='Invoice & Faktur Pajak'>
- <InvoiceComponent id={router.query.id} />
- </AppLayout>
+ <IsAuth>
+ <AppLayout title='Invoice & Faktur Pajak'>
+ <InvoiceComponent id={router.query.id} />
+ </AppLayout>
+ </IsAuth>
)
}
diff --git a/src/pages/my/invoices.jsx b/src/pages/my/invoices.jsx
index fd50c3c8..12a5ff7e 100644
--- a/src/pages/my/invoices.jsx
+++ b/src/pages/my/invoices.jsx
@@ -1,10 +1,13 @@
import AppLayout from '@/core/components/layouts/AppLayout'
+import IsAuth from '@/lib/auth/components/IsAuth'
import InvoicesComponent from '@/lib/invoice/components/Invoices'
export default function Invoices() {
return (
- <AppLayout title='Invoice & Faktur Pajak'>
- <InvoicesComponent />
- </AppLayout>
+ <IsAuth>
+ <AppLayout title='Invoice & Faktur Pajak'>
+ <InvoicesComponent />
+ </AppLayout>
+ </IsAuth>
)
}
diff --git a/src/pages/my/menu.jsx b/src/pages/my/menu.jsx
index 576919ae..40c84668 100644
--- a/src/pages/my/menu.jsx
+++ b/src/pages/my/menu.jsx
@@ -3,6 +3,7 @@ import Link from '@/core/components/elements/Link/Link'
import AppLayout from '@/core/components/layouts/AppLayout'
import useAuth from '@/core/hooks/useAuth'
import { deleteAuth } from '@/core/utils/auth'
+import IsAuth from '@/lib/auth/components/IsAuth'
import { ChevronRightIcon, UserIcon } from '@heroicons/react/24/solid'
import { useRouter } from 'next/router'
@@ -16,62 +17,64 @@ export default function Menu() {
}
return (
- <AppLayout title='Menu Utama'>
- <Link
- href='/my/profile'
- className='p-4 flex items-center'
- >
- <div className='rounded-full p-3 bg-gray_r-6 text-gray_r-12/80'>
- <UserIcon className='w-5' />
- </div>
- <div className='ml-4'>
- <div className='font-semibold text-gray_r-12'>{auth?.name}</div>
- {auth?.company && <div className='badge-solid-red mt-1'>Akun Bisnis</div>}
- {!auth?.company && <div className='badge-gray mt-1'>Akun Individu</div>}
- </div>
- <div className='ml-auto !text-gray_r-12'>
- <ChevronRightIcon className='w-6' />
- </div>
- </Link>
+ <IsAuth>
+ <AppLayout title='Menu Utama'>
+ <Link
+ href='/my/profile'
+ className='p-4 flex items-center'
+ >
+ <div className='rounded-full p-3 bg-gray_r-6 text-gray_r-12/80'>
+ <UserIcon className='w-5' />
+ </div>
+ <div className='ml-4'>
+ <div className='font-semibold text-gray_r-12'>{auth?.name}</div>
+ {auth?.company && <div className='badge-solid-red mt-1'>Akun Bisnis</div>}
+ {!auth?.company && <div className='badge-gray mt-1'>Akun Individu</div>}
+ </div>
+ <div className='ml-auto !text-gray_r-12'>
+ <ChevronRightIcon className='w-6' />
+ </div>
+ </Link>
- <Divider />
+ <Divider />
- <div className='flex flex-col gap-y-6 py-6'>
- <div>
- <MenuHeader>Aktivitas Pembelian</MenuHeader>
+ <div className='flex flex-col gap-y-6 py-6'>
+ <div>
+ <MenuHeader>Aktivitas Pembelian</MenuHeader>
- <div className='divide-y divide-gray_r-6 border-y border-gray_r-6 mt-4'>
- <LinkItem href='/my/transactions'>Daftar Transaksi</LinkItem>
- <LinkItem href='/my/invoices'>Invoice & Faktur Pajak</LinkItem>
- <LinkItem href='/my/wishlist'>Wishlist</LinkItem>
+ <div className='divide-y divide-gray_r-6 border-y border-gray_r-6 mt-4'>
+ <LinkItem href='/my/transactions'>Daftar Transaksi</LinkItem>
+ <LinkItem href='/my/invoices'>Invoice & Faktur Pajak</LinkItem>
+ <LinkItem href='/my/wishlist'>Wishlist</LinkItem>
+ </div>
</div>
- </div>
- <div>
- <MenuHeader>Pusat Bantuan</MenuHeader>
+ <div>
+ <MenuHeader>Pusat Bantuan</MenuHeader>
- <div className='divide-y divide-gray_r-6 border-y border-gray_r-6 mt-4'>
- <LinkItem href='/'>Customer Support</LinkItem>
- <LinkItem href='/'>F.A.Q</LinkItem>
+ <div className='divide-y divide-gray_r-6 border-y border-gray_r-6 mt-4'>
+ <LinkItem href='/'>Customer Support</LinkItem>
+ <LinkItem href='/'>F.A.Q</LinkItem>
+ </div>
</div>
- </div>
- <div>
- <MenuHeader>Pengaturan Akun</MenuHeader>
+ <div>
+ <MenuHeader>Pengaturan Akun</MenuHeader>
- <div className='divide-y divide-gray_r-6 border-y border-gray_r-6 mt-4'>
- <LinkItem href='/my/address'>Daftar Alamat</LinkItem>
- </div>
+ <div className='divide-y divide-gray_r-6 border-y border-gray_r-6 mt-4'>
+ <LinkItem href='/my/address'>Daftar Alamat</LinkItem>
+ </div>
- <div
- onClick={logout}
- className='p-4 mt-2'
- >
- <button className='w-full btn-red'>Keluar Akun</button>
+ <div
+ onClick={logout}
+ className='p-4 mt-2'
+ >
+ <button className='w-full btn-red'>Keluar Akun</button>
+ </div>
</div>
</div>
- </div>
- </AppLayout>
+ </AppLayout>
+ </IsAuth>
)
}
diff --git a/src/pages/my/profile.jsx b/src/pages/my/profile.jsx
index 8a91ea17..72a1ee3c 100644
--- a/src/pages/my/profile.jsx
+++ b/src/pages/my/profile.jsx
@@ -2,15 +2,18 @@ import Divider from '@/core/components/elements/Divider/Divider'
import AppLayout from '@/core/components/layouts/AppLayout'
import useAuth from '@/core/hooks/useAuth'
import CompanyProfile from '@/lib/auth/components/CompanyProfile'
+import IsAuth from '@/lib/auth/components/IsAuth'
import PersonalProfile from '@/lib/auth/components/PersonalProfile'
export default function Profile() {
const auth = useAuth()
return (
- <AppLayout title='Akun Saya'>
- <PersonalProfile />
- <Divider />
- {auth?.parentId && <CompanyProfile />}
- </AppLayout>
+ <IsAuth>
+ <AppLayout title='Akun Saya'>
+ <PersonalProfile />
+ <Divider />
+ {auth?.parentId && <CompanyProfile />}
+ </AppLayout>
+ </IsAuth>
)
}
diff --git a/src/pages/my/transaction/[id].jsx b/src/pages/my/transaction/[id].jsx
index ae27ab88..5167748c 100644
--- a/src/pages/my/transaction/[id].jsx
+++ b/src/pages/my/transaction/[id].jsx
@@ -1,4 +1,5 @@
import AppLayout from '@/core/components/layouts/AppLayout'
+import IsAuth from '@/lib/auth/components/IsAuth'
import TransactionComponent from '@/lib/transaction/components/Transaction'
import { useRouter } from 'next/router'
@@ -6,8 +7,10 @@ export default function Transaction() {
const router = useRouter()
return (
- <AppLayout title='Transaksi'>
- <TransactionComponent id={router.query.id} />
- </AppLayout>
+ <IsAuth>
+ <AppLayout title='Transaksi'>
+ <TransactionComponent id={router.query.id} />
+ </AppLayout>
+ </IsAuth>
)
}
diff --git a/src/pages/my/transactions.jsx b/src/pages/my/transactions.jsx
index d18a00f4..30b9be07 100644
--- a/src/pages/my/transactions.jsx
+++ b/src/pages/my/transactions.jsx
@@ -1,12 +1,15 @@
import AppLayout from '@/core/components/layouts/AppLayout'
+import IsAuth from '@/lib/auth/components/IsAuth'
import dynamic from 'next/dynamic'
const TransactionsComponent = dynamic(() => import('@/lib/transaction/components/Transactions'))
export default function Transactions() {
return (
- <AppLayout title='Transaksi'>
- <TransactionsComponent />
- </AppLayout>
+ <IsAuth>
+ <AppLayout title='Transaksi'>
+ <TransactionsComponent />
+ </AppLayout>
+ </IsAuth>
)
}
diff --git a/src/pages/my/wishlist.jsx b/src/pages/my/wishlist.jsx
index f1c0bf28..196adf50 100644
--- a/src/pages/my/wishlist.jsx
+++ b/src/pages/my/wishlist.jsx
@@ -1,10 +1,13 @@
import AppLayout from '@/core/components/layouts/AppLayout'
+import IsAuth from '@/lib/auth/components/IsAuth'
import Wishlists from '@/lib/wishlist/components/Wishlists'
export default function Wishlist() {
return (
- <AppLayout title='Wishlist'>
- <Wishlists />
- </AppLayout>
+ <IsAuth>
+ <AppLayout title='Wishlist'>
+ <Wishlists />
+ </AppLayout>
+ </IsAuth>
)
}
diff --git a/src/pages/shop/checkout/finish.jsx b/src/pages/shop/checkout/finish.jsx
index fb6970f6..cc64199f 100644
--- a/src/pages/shop/checkout/finish.jsx
+++ b/src/pages/shop/checkout/finish.jsx
@@ -1,4 +1,5 @@
import BasicLayout from '@/core/components/layouts/BasicLayout'
+import IsAuth from '@/lib/auth/components/IsAuth'
import FinishCheckoutComponent from '@/lib/checkout/components/FinishCheckout'
import { useRouter } from 'next/router'
@@ -6,8 +7,10 @@ export default function Finish() {
const router = useRouter()
return (
- <BasicLayout>
- <FinishCheckoutComponent id={router.query.id || 0} />
- </BasicLayout>
+ <IsAuth>
+ <BasicLayout>
+ <FinishCheckoutComponent id={router.query.id || 0} />
+ </BasicLayout>
+ </IsAuth>
)
}
diff --git a/src/pages/shop/checkout/index.jsx b/src/pages/shop/checkout/index.jsx
index 5e8f2663..015a11b3 100644
--- a/src/pages/shop/checkout/index.jsx
+++ b/src/pages/shop/checkout/index.jsx
@@ -1,10 +1,13 @@
import AppLayout from '@/core/components/layouts/AppLayout'
+import IsAuth from '@/lib/auth/components/IsAuth'
import CheckoutComponent from '@/lib/checkout/components/Checkout'
export default function Checkout() {
return (
- <AppLayout title='Checkout'>
- <CheckoutComponent />
- </AppLayout>
+ <IsAuth>
+ <AppLayout title='Checkout'>
+ <CheckoutComponent />
+ </AppLayout>
+ </IsAuth>
)
}
diff --git a/src/pages/shop/quotation/finish.jsx b/src/pages/shop/quotation/finish.jsx
index 98ffeec2..15881ea0 100644
--- a/src/pages/shop/quotation/finish.jsx
+++ b/src/pages/shop/quotation/finish.jsx
@@ -1,6 +1,7 @@
import Link from '@/core/components/elements/Link/Link'
import BasicLayout from '@/core/components/layouts/BasicLayout'
import useAuth from '@/core/hooks/useAuth'
+import IsAuth from '@/lib/auth/components/IsAuth'
import { EnvelopeIcon } from '@heroicons/react/24/outline'
import { useRouter } from 'next/router'
@@ -9,33 +10,35 @@ export default function FinishQuotation() {
const router = useRouter()
const { id } = router.query
return (
- <BasicLayout>
- <div className='m-4 px-4 py-6 shadow-md border border-gray_r-3'>
- <div className='flex'>
- <span className='p-3 mx-auto bg-yellow_r-3 border border-yellow_r-6 rounded'>
- <EnvelopeIcon className='w-8 text-yellow_r-11' />
- </span>
- </div>
- <p className='h2 text-center mt-6'>Terima Kasih {auth?.name}</p>
- <p className='text-center mt-3 leading-6 text-gray_r-11'>
- Penawaran harga kamu di Indoteknik.com berhasil dikirimkan, tim kami akan segera menghubungi
- anda.
- </p>
- {id && (
- <Link
- href={`/my/transaction/${id}`}
- className='btn-yellow !text-gray_r-12 mt-6 w-full'
- >
- Lihat Penawaran
- </Link>
- )}
- <Link
- href='/'
- className='btn-light !text-gray_r-12 mt-2 w-full'
- >
- Ke Halaman Utama
- </Link>
- </div>
- </BasicLayout>
+ <IsAuth>
+ <BasicLayout>
+ <div className='m-4 px-4 py-6 shadow-md border border-gray_r-3'>
+ <div className='flex'>
+ <span className='p-3 mx-auto bg-yellow_r-3 border border-yellow_r-6 rounded'>
+ <EnvelopeIcon className='w-8 text-yellow_r-11' />
+ </span>
+ </div>
+ <p className='h2 text-center mt-6'>Terima Kasih {auth?.name}</p>
+ <p className='text-center mt-3 leading-6 text-gray_r-11'>
+ Penawaran harga kamu di Indoteknik.com berhasil dikirimkan, tim kami akan segera
+ menghubungi anda.
+ </p>
+ {id && (
+ <Link
+ href={`/my/transaction/${id}`}
+ className='btn-yellow !text-gray_r-12 mt-6 w-full'
+ >
+ Lihat Penawaran
+ </Link>
+ )}
+ <Link
+ href='/'
+ className='btn-light !text-gray_r-12 mt-2 w-full'
+ >
+ Ke Halaman Utama
+ </Link>
+ </div>
+ </BasicLayout>
+ </IsAuth>
)
}
diff --git a/src/pages/shop/quotation/index.jsx b/src/pages/shop/quotation/index.jsx
index 744b75fe..ff8b8644 100644
--- a/src/pages/shop/quotation/index.jsx
+++ b/src/pages/shop/quotation/index.jsx
@@ -1,10 +1,13 @@
import AppLayout from '@/core/components/layouts/AppLayout'
+import IsAuth from '@/lib/auth/components/IsAuth'
import QuotationComponent from '@/lib/quotation/components/Quotation'
export default function Quotation() {
return (
- <AppLayout title='Quotation'>
- <QuotationComponent />
- </AppLayout>
+ <IsAuth>
+ <AppLayout title='Quotation'>
+ <QuotationComponent />
+ </AppLayout>
+ </IsAuth>
)
}