Skip to content

Commit 2414f36

Browse files
committed
refactor: remove notification in register button
1 parent 6b526e3 commit 2414f36

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

src/app/(app)/workshop/[workshopId]/_components/register-button.tsx

-9
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import * as React from "react"
44
import { toast } from "sonner"
55

6-
import { notifyOrganizerAboutRegistration } from "@/server/actions/notification"
76
import {
87
cancelRegistrationAction,
98
registerUserAction,
@@ -22,7 +21,6 @@ interface RegisterButtonProps {
2221
export function RegisterButton({
2322
userId,
2423
workshopId,
25-
workshopTitle,
2624
isCurrentUserRegistered,
2725
}: RegisterButtonProps) {
2826
const [isPending, startTransition] = React.useTransition()
@@ -43,13 +41,6 @@ export function RegisterButton({
4341
return
4442
}
4543

46-
if (!isCurrentUserRegistered) {
47-
await notifyOrganizerAboutRegistration({
48-
workshopId,
49-
workshopTitle,
50-
})
51-
}
52-
5344
toast.success(
5445
isCurrentUserRegistered
5546
? "Registration Canceled"

0 commit comments

Comments
 (0)