diff options
| author | IT Fixcomart <it@fixcomart.co.id> | 2023-05-17 01:55:14 +0000 |
|---|---|---|
| committer | IT Fixcomart <it@fixcomart.co.id> | 2023-05-17 01:55:14 +0000 |
| commit | e16d278e6c63177d488bb8b5c62cedc898906c09 (patch) | |
| tree | 2b2a20ea2ac439ec2945f921f21f9160cd7b6c28 /src/pages | |
| parent | 6608d0e62fd232cbc19f42f58d1f56cfe2ef6842 (diff) | |
| parent | 0abaa462194715c25cee5fcede0da3085939b402 (diff) | |
Merged in master (pull request #8)
Master
Diffstat (limited to 'src/pages')
| -rw-r--r-- | src/pages/404.jsx | 4 | ||||
| -rw-r--r-- | src/pages/500.jsx | 22 | ||||
| -rw-r--r-- | src/pages/_app.jsx | 2 | ||||
| -rw-r--r-- | src/pages/_document.jsx | 11 | ||||
| -rw-r--r-- | src/pages/index.jsx | 51 | ||||
| -rw-r--r-- | src/pages/my/address/[id]/edit.jsx | 3 | ||||
| -rw-r--r-- | src/pages/my/address/create.jsx | 3 | ||||
| -rw-r--r-- | src/pages/my/address/index.jsx | 3 | ||||
| -rw-r--r-- | src/pages/my/invoices/[id].jsx | 3 | ||||
| -rw-r--r-- | src/pages/my/invoices/index.jsx | 3 | ||||
| -rw-r--r-- | src/pages/my/profile.jsx | 32 | ||||
| -rw-r--r-- | src/pages/my/quotations/[id].jsx | 3 | ||||
| -rw-r--r-- | src/pages/my/quotations/index.jsx | 3 | ||||
| -rw-r--r-- | src/pages/my/transactions/[id].jsx | 3 | ||||
| -rw-r--r-- | src/pages/my/transactions/index.jsx | 3 | ||||
| -rw-r--r-- | src/pages/my/wishlist.jsx | 3 |
16 files changed, 131 insertions, 21 deletions
diff --git a/src/pages/404.jsx b/src/pages/404.jsx index f73e6383..18560999 100644 --- a/src/pages/404.jsx +++ b/src/pages/404.jsx @@ -15,7 +15,9 @@ export default function PageNotFound() { width={1024} height={512} /> - <Link href='/' className='btn-yellow text-black mx-auto mt-4'>Kembali ke halaman utama</Link> + <Link href='/' className='btn-yellow !text-black mx-auto mt-4'> + Kembali ke halaman utama + </Link> </div> </BasicLayout> ) diff --git a/src/pages/500.jsx b/src/pages/500.jsx new file mode 100644 index 00000000..314714e0 --- /dev/null +++ b/src/pages/500.jsx @@ -0,0 +1,22 @@ +import Seo from '@/core/components/Seo' +import Link from '@/core/components/elements/Link/Link' +import BasicLayout from '@/core/components/layouts/BasicLayout' +import Image from 'next/image' + +export default function PageError() { + return ( + <BasicLayout> + <Seo title='Internal Server Error - Indoteknik.com' /> + <div className='container mx-auto'> + <Image + src='/images/page-error.svg' + alt='Page not found - Indoteknik' + className='w-full' + width={1024} + height={512} + /> + <Link href='/' className='btn-yellow !text-black mx-auto mt-4'>Kembali ke halaman utama</Link> + </div> + </BasicLayout> + ) +} diff --git a/src/pages/_app.jsx b/src/pages/_app.jsx index 2d74d8b7..4c4fed89 100644 --- a/src/pages/_app.jsx +++ b/src/pages/_app.jsx @@ -74,7 +74,7 @@ function MyApp({ Component, pageProps }) { <NextProgress color='#F01C21' options={{ showSpinner: false }} /> <QueryClientProvider client={queryClient}> <AnimatePresence - mode={isMobile ? 'wait' : 'sync'} + mode='popLayout' initial={false} onExitComplete={() => window.scrollTo(0, 0)} > diff --git a/src/pages/_document.jsx b/src/pages/_document.jsx index dbe210aa..2130c097 100644 --- a/src/pages/_document.jsx +++ b/src/pages/_document.jsx @@ -8,6 +8,17 @@ export default function MyDocument() { <Html> <Head> <link rel='icon' href='/favicon.ico' /> + <link rel='manifest' href='/manifest.json' /> + <link rel='apple-touch-icon' href='/icon.jpg'></link> + <link rel='apple-touch-startup-image' href='/images/splash/launch.png' /> + + <meta name='mobile-web-app-capable' content='yes' /> + <meta name='apple-mobile-web-app-capable' content='yes' /> + <meta name='apple-mobile-web-app-status-bar-style' content='default' /> + <meta name='apple-mobile-web-app-title' content='Indoteknik.com' /> + <meta name='theme-color' content='#fff' /> + + <link rel='prefetch' href='/images/logo-indoteknik-gear.png' /> <meta name='facebook-domain-verification' content='328wmjs7hcnz74rwsqzxvq50rmbtm2' /> <Script diff --git a/src/pages/index.jsx b/src/pages/index.jsx index 1fe0e65a..31c6b240 100644 --- a/src/pages/index.jsx +++ b/src/pages/index.jsx @@ -8,7 +8,7 @@ import Seo from '@/core/components/Seo' import { useQuery } from 'react-query' import odooApi from '@/core/api/odooApi' import Image from 'next/image' -import CustomerReviews from '@/lib/review/components/CustomerReviews' +import DelayRender from '@/core/components/elements/DelayRender/DelayRender' const BasicLayout = dynamic(() => import('@/core/components/layouts/BasicLayout')) const FlashSale = dynamic(() => import('@/lib/flashSale/components/FlashSale')) @@ -24,6 +24,7 @@ const PopularProduct = dynamic(() => import('@/lib/home/components/PopularProduc const CategoryHomeId = dynamic(() => import('@/lib/home/components/CategoryHomeId'), { loading: () => <PopularProductSkeleton /> }) +const CustomerReviews = dynamic(() => import('@/lib/review/components/CustomerReviews')) export default function Home() { const fetchSecondHeroBanner = async () => await odooApi('GET', '/api/v1/banner?type=index-a-2') @@ -69,27 +70,49 @@ export default function Home() { <HeroBanner /> </div> <div className='w-3/12'> - <PopularProduct /> + <DelayRender renderAfter={200}> + <PopularProduct /> + </DelayRender> </div> </div> - <div className='my-16 flex flex-col gap-y-10'> - <PreferredBrand /> - <FlashSale /> - <CategoryHomeId /> - <CustomerReviews /> + <div className='my-16 flex flex-col gap-y-16'> + <DelayRender renderAfter={400}> + <PreferredBrand /> + </DelayRender> + <DelayRender renderAfter={600}> + <FlashSale /> + </DelayRender> + <DelayRender renderAfter={1000}> + <CategoryHomeId /> + </DelayRender> + <DelayRender renderAfter={1200}> + <CustomerReviews /> + </DelayRender> </div> </div> </DesktopView> <MobileView> - <HeroBanner /> - <div className='flex flex-col gap-y-6 my-6'> - <PreferredBrand /> - <FlashSale /> - <PopularProduct /> - <CategoryHomeId /> - <CustomerReviews /> + <DelayRender renderAfter={200}> + <HeroBanner /> + </DelayRender> + <div className='flex flex-col gap-y-12 my-6'> + <DelayRender renderAfter={400}> + <PreferredBrand /> + </DelayRender> + <DelayRender renderAfter={600}> + <FlashSale /> + </DelayRender> + <DelayRender renderAfter={800}> + <PopularProduct /> + </DelayRender> + <DelayRender renderAfter={1000}> + <CategoryHomeId /> + </DelayRender> + <DelayRender renderAfter={1200}> + <CustomerReviews /> + </DelayRender> </div> </MobileView> </BasicLayout> diff --git a/src/pages/my/address/[id]/edit.jsx b/src/pages/my/address/[id]/edit.jsx index 6706b458..bd680b90 100644 --- a/src/pages/my/address/[id]/edit.jsx +++ b/src/pages/my/address/[id]/edit.jsx @@ -1,3 +1,4 @@ +import Seo from '@/core/components/Seo' import AppLayout from '@/core/components/layouts/AppLayout' import BasicLayout from '@/core/components/layouts/BasicLayout' import DesktopView from '@/core/components/views/DesktopView' @@ -9,6 +10,8 @@ import IsAuth from '@/lib/auth/components/IsAuth' export default function EditAddress({ id, defaultValues }) { return ( <IsAuth> + <Seo title='Address - Indoteknik.com' /> + <MobileView> <AppLayout title='Ubah Alamat'> <EditAddressComponent id={id} defaultValues={defaultValues} /> diff --git a/src/pages/my/address/create.jsx b/src/pages/my/address/create.jsx index be645853..774e4327 100644 --- a/src/pages/my/address/create.jsx +++ b/src/pages/my/address/create.jsx @@ -1,3 +1,4 @@ +import Seo from '@/core/components/Seo' import AppLayout from '@/core/components/layouts/AppLayout' import BasicLayout from '@/core/components/layouts/BasicLayout' import DesktopView from '@/core/components/views/DesktopView' @@ -8,6 +9,8 @@ import IsAuth from '@/lib/auth/components/IsAuth' export default function CreateAddress() { return ( <IsAuth> + <Seo title='Address - Indoteknik.com' /> + <MobileView> <AppLayout title='Tambah Alamat'> <CreateAddressComponent /> diff --git a/src/pages/my/address/index.jsx b/src/pages/my/address/index.jsx index 61d72a41..bd8b3ac3 100644 --- a/src/pages/my/address/index.jsx +++ b/src/pages/my/address/index.jsx @@ -1,3 +1,4 @@ +import Seo from '@/core/components/Seo' import AppLayout from '@/core/components/layouts/AppLayout' import BasicLayout from '@/core/components/layouts/BasicLayout' import DesktopView from '@/core/components/views/DesktopView' @@ -8,6 +9,8 @@ import IsAuth from '@/lib/auth/components/IsAuth' export default function Addresses() { return ( <IsAuth> + <Seo title='Address - Indoteknik.com' /> + <MobileView> <AppLayout title='Daftar Alamat'> <AddressesComponent /> diff --git a/src/pages/my/invoices/[id].jsx b/src/pages/my/invoices/[id].jsx index 5972b382..c8f39acf 100644 --- a/src/pages/my/invoices/[id].jsx +++ b/src/pages/my/invoices/[id].jsx @@ -1,3 +1,4 @@ +import Seo from '@/core/components/Seo' import AppLayout from '@/core/components/layouts/AppLayout' import BasicLayout from '@/core/components/layouts/BasicLayout' import DesktopView from '@/core/components/views/DesktopView' @@ -11,6 +12,8 @@ export default function MyInvoice() { return ( <IsAuth> + <Seo title='Invoice - Indoteknik.com' /> + <MobileView> <AppLayout title='Invoice & Faktur Pajak'> <InvoiceComponent id={router.query.id} /> diff --git a/src/pages/my/invoices/index.jsx b/src/pages/my/invoices/index.jsx index 73c7b9fe..a2eeceaa 100644 --- a/src/pages/my/invoices/index.jsx +++ b/src/pages/my/invoices/index.jsx @@ -1,3 +1,4 @@ +import Seo from '@/core/components/Seo' import AppLayout from '@/core/components/layouts/AppLayout' import BasicLayout from '@/core/components/layouts/BasicLayout' import DesktopView from '@/core/components/views/DesktopView' @@ -8,6 +9,8 @@ import InvoicesComponent from '@/lib/invoice/components/Invoices' export default function MyInvoices() { return ( <IsAuth> + <Seo title='Invoices - Indoteknik.com' /> + <MobileView> <AppLayout title='Invoice & Faktur Pajak'> <InvoicesComponent /> diff --git a/src/pages/my/profile.jsx b/src/pages/my/profile.jsx index 72a1ee3c..25c3a608 100644 --- a/src/pages/my/profile.jsx +++ b/src/pages/my/profile.jsx @@ -1,19 +1,41 @@ import Divider from '@/core/components/elements/Divider/Divider' import AppLayout from '@/core/components/layouts/AppLayout' +import BasicLayout from '@/core/components/layouts/BasicLayout' +import DesktopView from '@/core/components/views/DesktopView' +import MobileView from '@/core/components/views/MobileView' import useAuth from '@/core/hooks/useAuth' import CompanyProfile from '@/lib/auth/components/CompanyProfile' import IsAuth from '@/lib/auth/components/IsAuth' +import Menu from '@/lib/auth/components/Menu' import PersonalProfile from '@/lib/auth/components/PersonalProfile' export default function Profile() { const auth = useAuth() return ( <IsAuth> - <AppLayout title='Akun Saya'> - <PersonalProfile /> - <Divider /> - {auth?.parentId && <CompanyProfile />} - </AppLayout> + <MobileView> + <AppLayout title='Akun Saya'> + <PersonalProfile /> + <Divider /> + {auth?.parentId && <CompanyProfile />} + </AppLayout> + </MobileView> + + <DesktopView> + <BasicLayout> + <div className='container mx-auto flex py-10'> + <div className='w-3/12 pr-4'> + <Menu /> + </div> + <div className='w-9/12 bg-white border border-gray_r-6 rounded'> + <PersonalProfile /> + <Divider /> + {auth?.parentId && <CompanyProfile />} + + </div> + </div> + </BasicLayout> + </DesktopView> </IsAuth> ) } diff --git a/src/pages/my/quotations/[id].jsx b/src/pages/my/quotations/[id].jsx index 1fbbf34a..3ddf939d 100644 --- a/src/pages/my/quotations/[id].jsx +++ b/src/pages/my/quotations/[id].jsx @@ -1,3 +1,4 @@ +import Seo from '@/core/components/Seo' import AppLayout from '@/core/components/layouts/AppLayout' import BasicLayout from '@/core/components/layouts/BasicLayout' import DesktopView from '@/core/components/views/DesktopView' @@ -11,6 +12,8 @@ export default function MyQuotation() { return ( <IsAuth> + <Seo title='Quotation - Indoteknik.com' /> + <MobileView> <AppLayout title='Transaksi'> <TransactionComponent id={router.query.id} /> diff --git a/src/pages/my/quotations/index.jsx b/src/pages/my/quotations/index.jsx index bd91d9d0..f850de76 100644 --- a/src/pages/my/quotations/index.jsx +++ b/src/pages/my/quotations/index.jsx @@ -1,3 +1,4 @@ +import Seo from '@/core/components/Seo' import AppLayout from '@/core/components/layouts/AppLayout' import BasicLayout from '@/core/components/layouts/BasicLayout' import DesktopView from '@/core/components/views/DesktopView' @@ -10,6 +11,8 @@ const TransactionsComponent = dynamic(() => import('@/lib/transaction/components export default function MyQuotations() { return ( <IsAuth> + <Seo title='Quotations - Indoteknik.com' /> + <MobileView> <AppLayout title='Quotation'> <TransactionsComponent context='quotation' /> diff --git a/src/pages/my/transactions/[id].jsx b/src/pages/my/transactions/[id].jsx index e36c1ca4..31c2cd63 100644 --- a/src/pages/my/transactions/[id].jsx +++ b/src/pages/my/transactions/[id].jsx @@ -1,3 +1,4 @@ +import Seo from '@/core/components/Seo' import AppLayout from '@/core/components/layouts/AppLayout' import BasicLayout from '@/core/components/layouts/BasicLayout' import DesktopView from '@/core/components/views/DesktopView' @@ -11,6 +12,8 @@ export default function MyTransaction() { return ( <IsAuth> + <Seo title='Transaction - Indoteknik.com' /> + <MobileView> <AppLayout title='Transaksi'> <TransactionComponent id={router.query.id} /> diff --git a/src/pages/my/transactions/index.jsx b/src/pages/my/transactions/index.jsx index 91482a39..c1fb9a67 100644 --- a/src/pages/my/transactions/index.jsx +++ b/src/pages/my/transactions/index.jsx @@ -1,3 +1,4 @@ +import Seo from '@/core/components/Seo' import AppLayout from '@/core/components/layouts/AppLayout' import BasicLayout from '@/core/components/layouts/BasicLayout' import DesktopView from '@/core/components/views/DesktopView' @@ -10,6 +11,8 @@ const TransactionsComponent = dynamic(() => import('@/lib/transaction/components export default function MyTransactions() { return ( <IsAuth> + <Seo title='Transactions - Indoteknik.com' /> + <MobileView> <AppLayout title='Transaksi'> <TransactionsComponent /> diff --git a/src/pages/my/wishlist.jsx b/src/pages/my/wishlist.jsx index 7d9ad0d7..52b70ae2 100644 --- a/src/pages/my/wishlist.jsx +++ b/src/pages/my/wishlist.jsx @@ -1,3 +1,4 @@ +import Seo from '@/core/components/Seo' import AppLayout from '@/core/components/layouts/AppLayout' import BasicLayout from '@/core/components/layouts/BasicLayout' import DesktopView from '@/core/components/views/DesktopView' @@ -8,6 +9,8 @@ import Wishlists from '@/lib/wishlist/components/Wishlists' export default function Wishlist() { return ( <IsAuth> + <Seo title='Wishlist - Indoteknik.com' /> + <MobileView> <AppLayout title='Wishlist'> <Wishlists /> |
