From 961d68ecdd7cb503889fc23e47490673d52bb5ac Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Fri, 12 May 2023 16:32:58 +0700 Subject: swiper loop slide --- src/lib/home/components/HeroBanner.jsx | 19 ++++++++++--------- src/lib/review/components/CustomerReviews.jsx | 14 ++++++++++++-- 2 files changed, 22 insertions(+), 11 deletions(-) diff --git a/src/lib/home/components/HeroBanner.jsx b/src/lib/home/components/HeroBanner.jsx index 50cfc0ff..889bb2ce 100644 --- a/src/lib/home/components/HeroBanner.jsx +++ b/src/lib/home/components/HeroBanner.jsx @@ -15,22 +15,23 @@ import Link from '@/core/components/elements/Link/Link' const HeroBanner = () => { const { heroBanners } = useHeroBanner() - const swiperBannerMobile = { - pagination: { dynamicBullets: true, clickable: true }, + const swiperBanner = { autoplay: { delay: 6000, disableOnInteraction: false }, - modules: [Pagination, Autoplay] + modules: [Pagination, Autoplay], + loop: true + } + + const swiperBannerMobile = { + ...swiperBanner, + pagination: { dynamicBullets: true, clickable: true } } const swiperBannerDesktop = { - pagination: { dynamicBullets: false, clickable: true }, - autoplay: { - delay: 6000, - disableOnInteraction: false - }, - modules: [Pagination, Autoplay] + ...swiperBanner, + pagination: { dynamicBullets: false, clickable: true } } return ( diff --git a/src/lib/review/components/CustomerReviews.jsx b/src/lib/review/components/CustomerReviews.jsx index 935d4a3d..5cc179e9 100644 --- a/src/lib/review/components/CustomerReviews.jsx +++ b/src/lib/review/components/CustomerReviews.jsx @@ -2,6 +2,7 @@ import DesktopView from '@/core/components/views/DesktopView' import MobileView from '@/core/components/views/MobileView' import Image from 'next/image' import { Swiper, SwiperSlide } from 'swiper/react' +import { Autoplay } from 'swiper' const { useQuery } = require('react-query') const { getCustomerReviews } = require('../api/customerReviewsApi') @@ -14,7 +15,7 @@ const CustomerReviews = () => {
Ulasan Konsumen Kami
- + {customerReviews && customerReviews?.map((customerReview) => ( @@ -25,7 +26,7 @@ const CustomerReviews = () => { - + {customerReviews && customerReviews?.map((customerReview) => ( @@ -38,6 +39,15 @@ const CustomerReviews = () => { ) } +const swiperProps = { + autoplay: { + delay: 6000, + disableOnInteraction: false + }, + loop: true, + modules: [Autoplay] +} + const Card = ({ customerReview }) => (
-- cgit v1.2.3 From 344fe1857b8307933082110c15b737af9118ac89 Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Fri, 12 May 2023 17:01:37 +0700 Subject: add robots.txt --- public/robots.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 public/robots.txt diff --git a/public/robots.txt b/public/robots.txt new file mode 100644 index 00000000..62114b1f --- /dev/null +++ b/public/robots.txt @@ -0,0 +1,12 @@ +# This says to apply these settings to ALL search engine spiders/crawlers +# User-agent: * +User-agent: Googlebot +Disalow: /shop/product/pdf/* +Disalow: /shop/product/https://* +Disallow: /v1/* +Disallow: /sentral.indoteknik.com* + +Sitemap: https://indoteknik.com/sitemap/products.xml +Sitemap: https://indoteknik.com/sitemap/brands.xml +Sitemap: https://indoteknik.com/sitemap/categories.xml +Sitemap: https://indoteknik.com/sitemap/videos.xml \ No newline at end of file -- cgit v1.2.3 From 2a0933e4dd2230bd76cf09f287dcbeee8ede67e3 Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Mon, 15 May 2023 09:39:34 +0700 Subject: Add quotation, invoice, transaction title and manage profile desktop --- src/lib/auth/components/CompanyProfile.jsx | 70 ++++++++++++------------- src/lib/auth/components/Menu.jsx | 3 ++ src/lib/auth/components/PersonalProfile.jsx | 54 +++++++++---------- src/lib/invoice/components/Invoices.jsx | 6 +-- src/lib/transaction/components/Transactions.jsx | 4 +- src/pages/my/address/[id]/edit.jsx | 3 ++ src/pages/my/address/create.jsx | 3 ++ src/pages/my/address/index.jsx | 3 ++ src/pages/my/invoices/[id].jsx | 3 ++ src/pages/my/invoices/index.jsx | 3 ++ src/pages/my/profile.jsx | 32 +++++++++-- src/pages/my/quotations/[id].jsx | 3 ++ src/pages/my/quotations/index.jsx | 3 ++ src/pages/my/transactions/[id].jsx | 3 ++ src/pages/my/transactions/index.jsx | 3 ++ src/pages/my/wishlist.jsx | 3 ++ 16 files changed, 125 insertions(+), 74 deletions(-) diff --git a/src/lib/auth/components/CompanyProfile.jsx b/src/lib/auth/components/CompanyProfile.jsx index 13d4a194..ff673953 100644 --- a/src/lib/auth/components/CompanyProfile.jsx +++ b/src/lib/auth/components/CompanyProfile.jsx @@ -60,7 +60,6 @@ const CompanyProfile = () => { } const isUpdated = await odooApi('PUT', `/api/v1/partner/${auth.parentId}`, data) if (isUpdated?.id) { - setIsOpen(false) toast.success('Berhasil mengubah profil', { duration: 1500 }) return } @@ -69,59 +68,58 @@ const CompanyProfile = () => { return ( <> - {isOpen && ( -
-
- - } - /> -
-
-
Nama Usaha
-
+ +
+
+ } + render={(props) => } />
-
- +
+
Nama Usaha
+
+ } + /> +
+
+ +
+
+
+ + +
+
+ +
-
- - -
-
- - -
- diff --git a/src/lib/auth/components/Menu.jsx b/src/lib/auth/components/Menu.jsx index 8a8e2e8a..f91fd552 100644 --- a/src/lib/auth/components/Menu.jsx +++ b/src/lib/auth/components/Menu.jsx @@ -29,6 +29,9 @@ const Menu = () => { Daftar Alamat + + Profil Saya + diff --git a/src/lib/auth/components/PersonalProfile.jsx b/src/lib/auth/components/PersonalProfile.jsx index bca54e24..b9fb3f5f 100644 --- a/src/lib/auth/components/PersonalProfile.jsx +++ b/src/lib/auth/components/PersonalProfile.jsx @@ -38,7 +38,6 @@ const PersonalProfile = () => { if (isUpdated?.user) { setAuth(isUpdated.user) setValue('password', '') - setIsOpen(false) toast.success('Berhasil mengubah profil', { duration: 1500 }) return } @@ -47,46 +46,45 @@ const PersonalProfile = () => { return ( <> - {isOpen && ( -
-
- - + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
-
- - -
-
- - -
-
- - -
- diff --git a/src/lib/invoice/components/Invoices.jsx b/src/lib/invoice/components/Invoices.jsx index 96686bbb..5edcfdbf 100644 --- a/src/lib/invoice/components/Invoices.jsx +++ b/src/lib/invoice/components/Invoices.jsx @@ -71,7 +71,7 @@ const Invoices = () => { {!invoices.isLoading && invoices.data?.invoices?.length === 0 && ( - Tidak ada data invoice + Tidak ada invoice )} @@ -198,7 +198,7 @@ const Invoices = () => { {invoices.isLoading && ( - +
@@ -208,7 +208,7 @@ const Invoices = () => { {!invoices.isLoading && (!invoices?.data?.invoices || invoices?.data?.invoices?.length == 0) && ( - Tidak ada data invoice + Tidak ada invoice )} {invoices.data?.invoices?.map((invoice) => ( diff --git a/src/lib/transaction/components/Transactions.jsx b/src/lib/transaction/components/Transactions.jsx index c1c27a51..642881a6 100644 --- a/src/lib/transaction/components/Transactions.jsx +++ b/src/lib/transaction/components/Transactions.jsx @@ -83,7 +83,7 @@ const Transactions = ({ context = '' }) => { {!transactions.isLoading && transactions.data?.saleOrders?.length === 0 && ( - Tidak ada data transaksi + Tidak ada transaksi )} @@ -246,7 +246,7 @@ const Transactions = ({ context = '' }) => { (!transactions?.data?.saleOrders || transactions?.data?.saleOrders?.length == 0) && ( - Tidak ada data transaksi + Tidak ada transaksi )} {transactions.data?.saleOrders?.map((saleOrder) => ( 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 ( + + 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 ( + + 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 ( + + 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 ( + + 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 ( + + 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 ( - - - - {auth?.parentId && } - + + + + + {auth?.parentId && } + + + + + +
+
+ +
+
+ + + {auth?.parentId && } + +
+
+
+
) } 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 ( + + 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 ( + + 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 ( + + 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 ( + + 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 ( + + -- cgit v1.2.3 From df7a1e34fab9014e775facfb20e58e7087200160 Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Mon, 15 May 2023 15:09:03 +0700 Subject: sticky menu on user dashboard --- src/lib/auth/components/Menu.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/auth/components/Menu.jsx b/src/lib/auth/components/Menu.jsx index f91fd552..386b817c 100644 --- a/src/lib/auth/components/Menu.jsx +++ b/src/lib/auth/components/Menu.jsx @@ -7,7 +7,7 @@ const Menu = () => { const routeStartWith = (route) => router.pathname.startsWith(route) return ( -
+
Menu
Daftar Quotation -- cgit v1.2.3 From 9da4c372d4ff44c130c9383765710f7287b62c52 Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Mon, 15 May 2023 17:01:39 +0700 Subject: internal server error pager --- public/images/page-error.svg | 2718 ++++++++++++++++++++++++++++++++++++++++++ src/pages/404.jsx | 4 +- src/pages/500.jsx | 22 + 3 files changed, 2743 insertions(+), 1 deletion(-) create mode 100644 public/images/page-error.svg create mode 100644 src/pages/500.jsx diff --git a/public/images/page-error.svg b/public/images/page-error.svg new file mode 100644 index 00000000..7126aefe --- /dev/null +++ b/public/images/page-error.svg @@ -0,0 +1,2718 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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} /> - Kembali ke halaman utama + + Kembali ke halaman utama +
) 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 ( + + +
+ Page not found - Indoteknik + Kembali ke halaman utama +
+
+ ) +} -- cgit v1.2.3 From d0fa61c83fb50d504600ac8701ad3dc4c2de0f11 Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Tue, 16 May 2023 09:59:24 +0700 Subject: fix bug change paqe --- src/pages/_app.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 }) { window.scrollTo(0, 0)} > -- cgit v1.2.3 From 24c444c51927886536f6701c7b7ba85890cc259c Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Tue, 16 May 2023 11:05:37 +0700 Subject: add pwa --- next.config.js | 9 +++++- package.json | 1 + public/favicon.ico | Bin 1150 -> 4286 bytes public/icon-192x192.png | Bin 0 -> 31481 bytes public/icon-256x256.png | Bin 0 -> 31481 bytes public/icon-384x384.png | Bin 0 -> 31481 bytes public/icon-512x512.png | Bin 0 -> 31481 bytes public/icon.png | Bin 0 -> 31481 bytes .../loaderio-771e5c407ca162e7e90e487dfaa73477.txt | 1 - public/manifest.json | 33 +++++++++++++++++++++ src/pages/_document.jsx | 5 ++++ 11 files changed, 47 insertions(+), 2 deletions(-) create mode 100644 public/icon-192x192.png create mode 100644 public/icon-256x256.png create mode 100644 public/icon-384x384.png create mode 100644 public/icon-512x512.png create mode 100644 public/icon.png delete mode 100644 public/loaderio-771e5c407ca162e7e90e487dfaa73477.txt create mode 100644 public/manifest.json diff --git a/next.config.js b/next.config.js index d02aa9f0..2f3f4396 100644 --- a/next.config.js +++ b/next.config.js @@ -1,4 +1,11 @@ /** @type {import('next').NextConfig} */ +const withPWA = require('next-pwa')({ + dest: 'public', + register: true, + disable: process.env.NODE_ENV === 'development', + skipWaiting: true +}) + const nextConfig = { reactStrictMode: true, swcMinify: true, @@ -25,4 +32,4 @@ const nextConfig = { } } -module.exports = nextConfig +module.exports = withPWA(nextConfig) diff --git a/package.json b/package.json index a4363bfd..cf46db5f 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,7 @@ "midtrans-client": "^1.3.1", "next": "13.0.0", "next-progress": "^2.2.0", + "next-pwa": "^5.6.0", "next-seo": "^5.15.0", "nodemailer": "^6.8.0", "react": "18.2.0", diff --git a/public/favicon.ico b/public/favicon.ico index 2fd36c90..0f30f234 100644 Binary files a/public/favicon.ico and b/public/favicon.ico differ diff --git a/public/icon-192x192.png b/public/icon-192x192.png new file mode 100644 index 00000000..23336bb3 Binary files /dev/null and b/public/icon-192x192.png differ diff --git a/public/icon-256x256.png b/public/icon-256x256.png new file mode 100644 index 00000000..23336bb3 Binary files /dev/null and b/public/icon-256x256.png differ diff --git a/public/icon-384x384.png b/public/icon-384x384.png new file mode 100644 index 00000000..23336bb3 Binary files /dev/null and b/public/icon-384x384.png differ diff --git a/public/icon-512x512.png b/public/icon-512x512.png new file mode 100644 index 00000000..23336bb3 Binary files /dev/null and b/public/icon-512x512.png differ diff --git a/public/icon.png b/public/icon.png new file mode 100644 index 00000000..23336bb3 Binary files /dev/null and b/public/icon.png differ diff --git a/public/loaderio-771e5c407ca162e7e90e487dfaa73477.txt b/public/loaderio-771e5c407ca162e7e90e487dfaa73477.txt deleted file mode 100644 index a6a8433a..00000000 --- a/public/loaderio-771e5c407ca162e7e90e487dfaa73477.txt +++ /dev/null @@ -1 +0,0 @@ -loaderio-771e5c407ca162e7e90e487dfaa73477 \ No newline at end of file diff --git a/public/manifest.json b/public/manifest.json new file mode 100644 index 00000000..987045b0 --- /dev/null +++ b/public/manifest.json @@ -0,0 +1,33 @@ +{ + "theme_color" : "#F8C20A", + "background_color" : "#CC2020", + "display" : "standalone", + "scope" : "/", + "start_url" : "/", + "name" : "Indoteknik.com", + "short_name" : "Indoteknik.com", + "description" : "Indoteknik.com: B2B Industrial Supply & Solution", + "orientation": "portrait", + "icons": [ + { + "src": "/icon-192x192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "/icon-256x256.png", + "sizes": "256x256", + "type": "image/png" + }, + { + "src": "/icon-384x384.png", + "sizes": "384x384", + "type": "image/png" + }, + { + "src": "/icon-512x512.png", + "sizes": "512x512", + "type": "image/png" + } + ] +} \ No newline at end of file diff --git a/src/pages/_document.jsx b/src/pages/_document.jsx index dbe210aa..8d3904d0 100644 --- a/src/pages/_document.jsx +++ b/src/pages/_document.jsx @@ -8,6 +8,11 @@ export default function MyDocument() { + + + + +