fix: Toast message variable issue (#11879)

This commit is contained in:
Raj Patel authored and GitHub committed 2023-10-14 14:39:17 +00:00
1 parent f0c10ba5ec
commit c75b5bec07
7 files changed
+19 -9

No files matched your search

@@ -117,7 +117,12 @@ export default function CreateEventTypeDialog({
const createMutation = trpc.viewer.eventTypes.create.useMutation({
onSuccess: async ({ eventType }) => {
await router.replace(`/event-types/${eventType.id}`);
showToast(t("event_type_created_successfully"), "success");
showToast(
t("event_type_created_successfully", {
eventTypeTitle: eventType.title,
}),
"success"
);
},
onError: (err) => {
if (err instanceof HttpError) {
@@ -66,7 +66,12 @@ const DuplicateDialog = () => {
const duplicateMutation = trpc.viewer.eventTypes.duplicate.useMutation({
onSuccess: async ({ eventType }) => {
await router.replace(`/event-types/${eventType.id}`);
showToast(t("event_type_created_successfully"), "success");
showToast(
t("event_type_created_successfully", {
eventTypeTitle: eventType.title,
}),
"success"
);
},
onError: (err) => {
if (err instanceof HttpError) {