diff options
Diffstat (limited to 'src/pages/shop')
| -rw-r--r-- | src/pages/shop/brands/[slug].js | 8 | ||||
| -rw-r--r-- | src/pages/shop/product/[slug].js | 2 | ||||
| -rw-r--r-- | src/pages/shop/search.js | 8 |
3 files changed, 9 insertions, 9 deletions
diff --git a/src/pages/shop/brands/[slug].js b/src/pages/shop/brands/[slug].js index b532e7a7..c0524207 100644 --- a/src/pages/shop/brands/[slug].js +++ b/src/pages/shop/brands/[slug].js @@ -13,8 +13,8 @@ export async function getServerSideProps(context) { slug, page = 1, category = '', - price_from = '0', - price_to = '0', + price_from = '', + price_to = '', order_by = '', } = context.query; @@ -62,8 +62,8 @@ export default function BrandDetail({ const route = () => { let route = `/shop/brands/${slug}`; if (category) route += `&category=${category}`; - if (price_from > 0) route += `&price_from=${price_from}`; - if (price_to > 0) route += `&price_to=${price_to}`; + if (price_from) route += `&price_from=${price_from}`; + if (price_to) route += `&price_to=${price_to}`; if (order_by) route += `&order_by=${order_by}`; return route; } diff --git a/src/pages/shop/product/[slug].js b/src/pages/shop/product/[slug].js index dd554660..1ef693c0 100644 --- a/src/pages/shop/product/[slug].js +++ b/src/pages/shop/product/[slug].js @@ -165,7 +165,7 @@ export default function ProductDetail({ product }) { </div> <div className="mt-10"> - <h2 className="h1 mb-4">Produk Lainnya</h2> + <h2 className="font-bold mb-4">Produk Lainnya</h2> <ProductSlider products={similarProducts}/> </div> </div> diff --git a/src/pages/shop/search.js b/src/pages/shop/search.js index 2ae3cca4..e365fcf5 100644 --- a/src/pages/shop/search.js +++ b/src/pages/shop/search.js @@ -13,8 +13,8 @@ export async function getServerSideProps(context) { page = 1, brand = '', category = '', - price_from = '0', - price_to = '0', + price_from = '', + price_to = '', order_by = '', } = context.query; @@ -53,8 +53,8 @@ export default function ShopSearch({ let route = `/shop/search?q=${q}`; if (brand) route += `&brand=${brand}`; if (category) route += `&category=${category}`; - if (price_from > 0) route += `&price_from=${price_from}`; - if (price_to > 0) route += `&price_to=${price_to}`; + if (price_from) route += `&price_from=${price_from}`; + if (price_to) route += `&price_to=${price_to}`; if (order_by) route += `&order_by=${order_by}`; return route; } |
