Skip to content

Commit

Permalink
refactor: remove notification in register button
Browse files Browse the repository at this point in the history
  • Loading branch information
Raphico committed Jul 1, 2024
1 parent 6b526e3 commit 2414f36
Showing 1 changed file with 0 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import * as React from "react"
import { toast } from "sonner"

import { notifyOrganizerAboutRegistration } from "@/server/actions/notification"
import {
cancelRegistrationAction,
registerUserAction,
Expand All @@ -22,7 +21,6 @@ interface RegisterButtonProps {
export function RegisterButton({
userId,
workshopId,
workshopTitle,
isCurrentUserRegistered,
}: RegisterButtonProps) {
const [isPending, startTransition] = React.useTransition()
Expand All @@ -43,13 +41,6 @@ export function RegisterButton({
return
}

if (!isCurrentUserRegistered) {
await notifyOrganizerAboutRegistration({
workshopId,
workshopTitle,
})
}

toast.success(
isCurrentUserRegistered
? "Registration Canceled"
Expand Down

0 comments on commit 2414f36

Please sign in to comment.