diff options
| author | Rafi Zadanly <zadanlyr@gmail.com> | 2023-02-27 10:49:45 +0700 |
|---|---|---|
| committer | Rafi Zadanly <zadanlyr@gmail.com> | 2023-02-27 10:49:45 +0700 |
| commit | ffa261e6adef70a2845878cf93e6e492eb8cee62 (patch) | |
| tree | c860ac8d127795ee813af59923305736596264c2 /src/pages/shop | |
| parent | 14ad96a9d010790fe7a482035d6d88f36db660fe (diff) | |
footer
Diffstat (limited to 'src/pages/shop')
| -rw-r--r-- | src/pages/shop/checkout/finish.jsx | 9 | ||||
| -rw-r--r-- | src/pages/shop/checkout/index.jsx | 9 | ||||
| -rw-r--r-- | src/pages/shop/quotation/finish.jsx | 59 | ||||
| -rw-r--r-- | src/pages/shop/quotation/index.jsx | 9 |
4 files changed, 49 insertions, 37 deletions
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> ) } |
