catalog list placeholder
This commit is contained in:
@@ -2,13 +2,30 @@ import { type FC } from 'react'
|
||||
import { useGetCatalog } from '../home/hooks/useHomeData'
|
||||
import GridWrapper from '@/components/GridWrapper'
|
||||
import CatalogueItem from './components/CatalogueItem'
|
||||
import Button from '@/components/Button'
|
||||
import { Link } from 'react-router-dom'
|
||||
import { Paths } from '@/config/Paths'
|
||||
|
||||
const CatalogueList: FC = () => {
|
||||
|
||||
const { data, refetch } = useGetCatalog()
|
||||
const { data, refetch, isPending } = useGetCatalog()
|
||||
|
||||
return (
|
||||
<div className='w-full mt-5'>
|
||||
{
|
||||
!isPending && !data?.data?.length &&
|
||||
<div className='flex flex-col items-center gap-5'>
|
||||
<div className='text-gray-500'>
|
||||
هنوز کاتالوگی ساخته نشده است.
|
||||
</div>
|
||||
|
||||
<Link to={Paths.home}>
|
||||
<Button className='w-fit px-4'>
|
||||
ساخت کاتالوگ جدید
|
||||
</Button>
|
||||
</Link>
|
||||
</div>
|
||||
}
|
||||
<GridWrapper desktop={4} gapDesktop={40} mobile={1}>
|
||||
{
|
||||
data?.data?.map((item) => {
|
||||
|
||||
Reference in New Issue
Block a user