structure category product

This commit is contained in:
hamid zarghami
2026-01-24 09:24:18 +03:30
parent 2eba93984c
commit 2995bb86b4
12 changed files with 109 additions and 2 deletions
+11
View File
@@ -0,0 +1,11 @@
import { type FC } from 'react'
const ProductCategory: FC = () => {
return (
<div className='mt-5'>
<h1 className='text-lg font-light'>دسته بندی محصولات</h1>
</div>
)
}
export default ProductCategory
+29
View File
@@ -0,0 +1,29 @@
import { type FC } from 'react'
import { useGetCategory } from '../hooks/useProductData'
import Table from '@/components/Table'
import type { RowDataType } from '@/components/types/TableTypes'
import type { CategoryType } from '../types/Types'
const CategoryList: FC = () => {
const { data } = useGetCategory()
const column = [{
title: 'عنوان',
key: 'title',
}]
return (
<div className='mt-5'>
<h1 className='text-lg font-light'>دسته بندی محصولات</h1>
<Table
columns={column}
data={data?.data || [] as (CategoryType & RowDataType)[]}
/>
</div>
)
}
export default CategoryList