Skip to contentOpen History to see the last commit
destroy.jsx
10 lines289 Bytes
1import { redirect } from 'react-router-dom' 2import { deleteContact } from '../contacts' 6 async ({ params }) => { 7 await deleteContact(params.contactId) 8 queryClient.invalidateQueries({ queryKey: ['contacts'] })