From eb725020f57af538bfc9ef08f45e6b9d50bfcada Mon Sep 17 00:00:00 2001 From: Micha Date: Thu, 19 Jun 2025 04:32:09 +0200 Subject: [PATCH] feat(event-form): replace toast notification with custom ToastInner component --- src/components/forms/event-form.tsx | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/components/forms/event-form.tsx b/src/components/forms/event-form.tsx index 8be2602..afe424d 100644 --- a/src/components/forms/event-form.tsx +++ b/src/components/forms/event-form.tsx @@ -14,7 +14,7 @@ import { import ParticipantListEntry from '@/components/custom-ui/participantListEntry'; import { useRouter } from 'next/navigation'; import { toast } from 'sonner'; -import { CalendarCheck } from 'lucide-react'; +import { ToastInner } from '@/components/misc/toast-inner'; interface EventFormProps { type: 'create' | 'edit'; @@ -134,10 +134,16 @@ const EventForm: React.FC = (props) => { createEvent({ data }); } - toast('Event saved successfully', { - description: `Your event "${data.title}" has been saved.`, - icon: , - }); + toast.custom((t) => ( + router.push(`/event/${event?.id}`)} + variant='success' + buttonText='show' + /> + )); router.back(); }