We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c27c0dd commit 5ce8a9fCopy full SHA for 5ce8a9f
src/components/workshops/delete-workshop-alert.tsx
@@ -1,4 +1,5 @@
1
import * as React from "react"
2
+import { useRouter } from "next/navigation"
3
import { toast } from "sonner"
4
5
import { deleteWorkshopAction } from "@/server/actions/workshop"
@@ -28,6 +29,7 @@ export function DeleteWorkshopAlert({
28
29
setShowDeleteWorkshopAlert: React.Dispatch<React.SetStateAction<boolean>>
30
props: DeleteWorkshopAlertProps
31
}) {
32
+ const router = useRouter()
33
// eslint-disable-next-line @typescript-eslint/no-unused-vars
34
const [_, startTransition] = React.useTransition()
35
@@ -40,6 +42,7 @@ export function DeleteWorkshopAlert({
40
42
}
41
43
44
toast.success("Workshop Deleted")
45
+ router.push("/dashboard")
46
})
47
48
0 commit comments