From 92c2a229d9c9b510d71b928978872a8b107e9d5a Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Tue, 11 Apr 2023 09:47:25 +0700 Subject: Documentation and refactor code --- src/pages/forgot-password.jsx | 6 +++- src/pages/my/menu.jsx | 20 +++--------- src/pages/shop/brands/[slug].jsx | 5 ++- src/pages/shop/checkout/[status].jsx | 2 +- src/pages/shop/quotation/finish.jsx | 58 +++++++++++++++++----------------- src/pages/shop/search.jsx | 7 +--- src/pages/sitemap/products/[id].xml.js | 2 +- 7 files changed, 43 insertions(+), 57 deletions(-) (limited to 'src/pages') diff --git a/src/pages/forgot-password.jsx b/src/pages/forgot-password.jsx index 6211d237..23239363 100644 --- a/src/pages/forgot-password.jsx +++ b/src/pages/forgot-password.jsx @@ -91,7 +91,11 @@ const FormComponent = () => { placeholder='Masukan alamat email' autoFocus /> - diff --git a/src/pages/my/menu.jsx b/src/pages/my/menu.jsx index 851bcf56..e7ae27fd 100644 --- a/src/pages/my/menu.jsx +++ b/src/pages/my/menu.jsx @@ -19,10 +19,7 @@ export default function Menu() { return ( - +
@@ -64,10 +61,7 @@ export default function Menu() { Daftar Alamat -
+
@@ -78,19 +72,13 @@ export default function Menu() { } const MenuHeader = ({ children, ...props }) => ( -
+
{children}
) const LinkItem = ({ children, ...props }) => ( - + {children}
diff --git a/src/pages/shop/brands/[slug].jsx b/src/pages/shop/brands/[slug].jsx index 9c5193ad..88f19bc0 100644 --- a/src/pages/shop/brands/[slug].jsx +++ b/src/pages/shop/brands/[slug].jsx @@ -11,7 +11,7 @@ const Brand = dynamic(() => import('@/lib/brand/components/Brand')) export default function BrandDetail() { const router = useRouter() const { slug = '' } = router.query - + const brandName = getNameFromSlug(slug) return ( @@ -21,8 +21,7 @@ export default function BrandDetail() { additionalMetaTags={[ { property: 'keywords', - content: - `Jual ${brandName}, beli ${brandName}, Distributor ${brandName} Indonesia, cari ${brandName}, produk ${brandName}, ${brandName} Indonesia, harga ${brandName}` + content: `Jual ${brandName}, beli ${brandName}, Distributor ${brandName} Indonesia, cari ${brandName}, produk ${brandName}, ${brandName} Indonesia, harga ${brandName}` } ]} /> diff --git a/src/pages/shop/checkout/[status].jsx b/src/pages/shop/checkout/[status].jsx index 7c39718c..2c3bebcf 100644 --- a/src/pages/shop/checkout/[status].jsx +++ b/src/pages/shop/checkout/[status].jsx @@ -21,7 +21,7 @@ export default function Finish() { return ( <> - + diff --git a/src/pages/shop/quotation/finish.jsx b/src/pages/shop/quotation/finish.jsx index f6c0ac6b..0e9c5672 100644 --- a/src/pages/shop/quotation/finish.jsx +++ b/src/pages/shop/quotation/finish.jsx @@ -12,37 +12,37 @@ export default function FinishQuotation() { const { id } = router.query return ( <> - - - - -
-
-
- - - -
-

Terima Kasih {auth?.name}

-

- Penawaran harga kamu di Indoteknik.com berhasil dikirimkan, tim kami akan segera - menghubungi anda. -

- {id && ( - - Lihat Penawaran + + + + +
+
+
+ + + +
+

Terima Kasih {auth?.name}

+

+ Penawaran harga kamu di Indoteknik.com berhasil dikirimkan, tim kami akan segera + menghubungi anda. +

+ {id && ( + + Lihat Penawaran + + )} + + Ke Halaman Utama - )} - - Ke Halaman Utama - +
-
- - + + ) } diff --git a/src/pages/shop/search.jsx b/src/pages/shop/search.jsx index bf38d0bc..907465b7 100644 --- a/src/pages/shop/search.jsx +++ b/src/pages/shop/search.jsx @@ -13,12 +13,7 @@ export default function Search() { - {!_.isEmpty(router.query) && ( - - )} + {!_.isEmpty(router.query) && } ) } diff --git a/src/pages/sitemap/products/[id].xml.js b/src/pages/sitemap/products/[id].xml.js index e9caaa00..98c2bf40 100644 --- a/src/pages/sitemap/products/[id].xml.js +++ b/src/pages/sitemap/products/[id].xml.js @@ -8,7 +8,7 @@ export async function getServerSideProps({ res }) { const limit = 2500 const query = { limit } const products = await productSearchApi({ query: _.toQuery(query) }) - console.log(products); + console.log(products) // const sitemap = create('urlset', { encoding: 'UTF-8' }) // const date = new Date() -- cgit v1.2.3