add button to delete podcast & link to website

This commit is contained in:
2026-03-12 22:42:22 +03:00
parent 5409167a96
commit 3f418669f3
2 changed files with 54 additions and 1 deletions

View File

@@ -47,3 +47,14 @@ export const useCreatePodcastMutation = () => {
},
});
};
export const useDeletePodcastMutation = () => {
return useMutation({
mutationFn: async ({ id }: { id: number }) => {
const resp = await fetch(`/api/podcasts/${id}`, {
method: "DELETE",
});
return await resp.json();
},
});
};