This commit is contained in:
hamid zarghami
2025-10-22 11:15:44 +03:30
parent bf96947dbc
commit aa4bf7ecdb
15 changed files with 1556 additions and 13 deletions
@@ -0,0 +1,34 @@
import { type FC } from 'react'
import Button from '@/components/Button'
import { useOpenTicket } from '../hooks/useTicketData'
type Props = {
id: string,
refetch: () => void
}
const OpenTicket: FC<Props> = ({ id, refetch }) => {
const { mutate: openTicket, isPending } = useOpenTicket()
const handleOpenTicket = () => {
openTicket(id, {
onSuccess: () => {
refetch()
}
})
}
return (
<div>
<Button
label={'باز کردن تیکت'}
onClick={handleOpenTicket}
className='px-4 h-8 text-xs'
isLoading={isPending}
/>
</div>
)
}
export default OpenTicket