structure category product
This commit is contained in:
@@ -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
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user