diff --git a/src/components/Modals/DeleteListingItemModal.tsx b/src/components/Modals/DeleteListingItemModal.tsx index d6fc962..a20c904 100644 --- a/src/components/Modals/DeleteListingItemModal.tsx +++ b/src/components/Modals/DeleteListingItemModal.tsx @@ -21,7 +21,7 @@ export const DeleteListingItemModal = (props: Props) => { const router = useRouter(); const params = useParams(); - const { mutate, isLoading } = useMutation((id: number) => deleteListingAction(id, listingUserId!), { + const { mutate, isLoading } = useMutation((id: string) => deleteListingAction(id, listingUserId!), { onSuccess: (_, id) => { if ( [ diff --git a/src/components/Modals/DeleteSubscriptionItemModal.tsx b/src/components/Modals/DeleteSubscriptionItemModal.tsx index bb65f50..4e746b2 100644 --- a/src/components/Modals/DeleteSubscriptionItemModal.tsx +++ b/src/components/Modals/DeleteSubscriptionItemModal.tsx @@ -17,7 +17,7 @@ export const DeleteSubscriptionItemModal = (props: Props) => { const toastId = useRef(); - const { mutate, isLoading } = useMutation((id: number) => deleteListingSubscriptionAction(id, userId!), { + const { mutate, isLoading } = useMutation((id: string) => deleteListingSubscriptionAction(id, userId!), { onMutate: () => { setVisible(false); toastId.current = toast.loading(`Deleting subscription ${displayName}...`); diff --git a/src/components/Modals/RenewListingItemModal.tsx b/src/components/Modals/RenewListingItemModal.tsx index ce0a35b..20e8aa5 100644 --- a/src/components/Modals/RenewListingItemModal.tsx +++ b/src/components/Modals/RenewListingItemModal.tsx @@ -16,7 +16,7 @@ export const RenewListingItemModal = (props: Props) => { const { id: listingId, title: listingTitle, userId } = listingItem as ListingItem; const toastId = useRef(); - const { mutate, isLoading } = useMutation((id: number) => renewListingAction(id, userId!), { + const { mutate, isLoading } = useMutation((id: string) => renewListingAction(id, userId!), { onMutate: () => { setVisible(false); toastId.current = toast.loading(`Renewing advert ${listingTitle}...`);