diff options
| author | HATEC\SPVDEV001 <tri.susilo@altama.co.id> | 2023-05-08 16:44:09 +0700 |
|---|---|---|
| committer | HATEC\SPVDEV001 <tri.susilo@altama.co.id> | 2023-05-08 16:44:09 +0700 |
| commit | 486f85a45fc7e0669576f59824a31be472ed25bb (patch) | |
| tree | 0268afa8efe48746e040611ba41ad2cafda7ad08 /src/lib/category | |
| parent | cff198277e14450f8d20d9e18548325e6f277682 (diff) | |
| parent | 30fc50600009ca54f085d594d838803c107e87f2 (diff) | |
Merge branch 'master' into development_tri/implementasi_raja_ongkir
# Conflicts:
# src/lib/checkout/components/Checkout.jsx
Diffstat (limited to 'src/lib/category')
| -rw-r--r-- | src/lib/category/components/Category.jsx | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/lib/category/components/Category.jsx b/src/lib/category/components/Category.jsx index 9f34362c..884a871f 100644 --- a/src/lib/category/components/Category.jsx +++ b/src/lib/category/components/Category.jsx @@ -1,6 +1,7 @@ import odooApi from '@/core/api/odooApi' import Link from '@/core/components/elements/Link/Link' import DesktopView from '@/core/components/views/DesktopView' +import { createSlug } from '@/core/utils/slug' import { useEffect, useState } from 'react' const Category = () => { @@ -32,7 +33,7 @@ const Category = () => { {categories.map((category) => ( <div key={category.id}> <Link - href={`/shop/search?category=${category.name}`} + href={createSlug('/shop/category/', category.name, category.id)} className='category-mega-box__parent' > {category.name} @@ -42,7 +43,7 @@ const Category = () => { {category.childs.map((child1Category) => ( <div key={child1Category.id}> <Link - href={`/shop/search?category=${child1Category.name}`} + href={createSlug('/shop/category/', child1Category.name, child1Category.id)} className='category-mega-box__child-one mb-4' > {child1Category.name} @@ -50,7 +51,11 @@ const Category = () => { <div className='flex flex-col gap-y-3'> {child1Category.childs.map((child2Category) => ( <Link - href={`/shop/search?category=${child2Category.name}`} + href={createSlug( + '/shop/category/', + child2Category.name, + child2Category.id + )} className='category-mega-box__child-two' key={child2Category.id} > |
