catalog list placeholder

This commit is contained in:
hamid zarghami
2026-04-09 09:43:47 +03:30
parent c6f5999a8f
commit a978bef111
3 changed files with 22 additions and 4 deletions
+18 -1
View File
@@ -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) => {