summaryrefslogtreecommitdiff
path: root/src/lib/product/components
diff options
context:
space:
mode:
authorit-fixcomart <it@fixcomart.co.id>2024-07-05 10:06:49 +0700
committerit-fixcomart <it@fixcomart.co.id>2024-07-05 10:06:49 +0700
commit1a70984f3497652b8d8b64d16053c1f2be452bd7 (patch)
tree1acc978f2bc530d30fa2272f9613d464a8da80b9 /src/lib/product/components
parent6c79d14a11c8dba20778c0559230a406cd147cc7 (diff)
<iman> update category management
Diffstat (limited to 'src/lib/product/components')
-rw-r--r--src/lib/product/components/CategorySection.jsx22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/lib/product/components/CategorySection.jsx b/src/lib/product/components/CategorySection.jsx
index c250efeb..4c66e861 100644
--- a/src/lib/product/components/CategorySection.jsx
+++ b/src/lib/product/components/CategorySection.jsx
@@ -1,26 +1,26 @@
import Image from "next/image"
-import Link from '@/core/components/elements/Link/Link'
+import Link from 'next/link'
import { createSlug } from '@/core/utils/slug'
const CategorySection = ({ categories }) => {
return (
<section>
- <div className="group/item grid grid-cols-5 gap-y-2 w-full h-full col-span-2 ">
+ <div className="group/item grid grid-cols-5 gap-y-2 gap-x-2 w-full h-full col-span-2 ">
{categories.map((category) => (
- <div className="KartuInti h-24 w-26 max-w-sm lg:max-w-full flex flex-col border-[1px] border-gray-200 relative group">
- <div className='KartuB absolute h-48 w-60 inset-0 flex items-center justify-center '>
- <div className="group/edit flex items-center justify-center h-48 w-60 flex-row group-hover/item:visible">
- <div className=' h-36'>
- <Image className="group-hover:scale-110 duration-300" src='https://erp.indoteknik.com/api/image/product.template/image_256/544371?ratio=square' width={36} height={26} alt={category?.name} />
+ <Link href={createSlug('/shop/category/', category?.name, category?.id)} key={category?.id} passHref>
+ <div className="group transition-colors duration-300">
+ <div className="KartuInti h-18 w-26 max-w-sm lg:max-w-full flex flex-col border-[2px] border-gray-200 group-hover:border-red-400 rounded relative ">
+ <div className="flex items-center justify-center h-full px-1 flex-row">
+ <Image className="" src='https://erp.indoteknik.com/api/image/product.template/image_256/544371?ratio=square' width={56} height={48} alt={category?.name} />
+ <h2 className="text-gray-700 group-hover:text-[#E20613] line-clamp-2 content-center h-fit w-60 px-1 font-semibold text-sm text-start">{category?.name}</h2>
</div>
- <h2 className="text-gray-700 content-center text-wrap h-12 border-t-[1px] w-60 px-1 border-gray-200 font-normal text-sm text-center">{category?.name}</h2>
</div>
</div>
- </div>
+ </Link>
))}
- </div>
+ </div>
</section>
)
}
-export default CategorySection \ No newline at end of file
+export default CategorySection