delete section

This commit is contained in:
hamid zarghami
2026-02-02 10:19:39 +03:30
parent 7f2000ec6d
commit 41acb02611
3 changed files with 30 additions and 5 deletions
+7 -5
View File
@@ -1,14 +1,16 @@
import { type FC } from 'react'
import { useGetSections } from './hooks/usePrintData'
import { useDeleteSection, useGetSections } from './hooks/usePrintData'
import { Link } from 'react-router-dom'
import { Paths } from '@/config/Paths'
import Button from '@/components/Button'
import { AddSquare, Edit, More2 } from 'iconsax-react'
import Table from '@/components/Table'
import TrashWithConfrim from '@/components/TrashWithConfrim'
const SectionList: FC = () => {
const { data } = useGetSections()
const { mutate, isPending } = useDeleteSection()
return (
<div className='mt-5'>
@@ -61,11 +63,11 @@ const SectionList: FC = () => {
<Link to={Paths.print.update + item.id}>
<Edit size={20} color='#0037FF' />
</Link>
{/* <TrashWithConfrim
onDelete={() => handleDelete(item.id)}
isloading={isDeleting}
<TrashWithConfrim
onDelete={() => mutate(item.id)}
isloading={isPending}
colorIcon='red'
/> */}
/>
</div>
)
}