Skip to content

Commit

Permalink
added toast
Browse files Browse the repository at this point in the history
  • Loading branch information
fomalhautb committed Dec 19, 2024
1 parent 2d99e43 commit 968dcaa
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ function EditEmailServerDialog(props: {
const [error, setError] = useState<string | null>(null);
const [formValues, setFormValues] = useState<any>(null);
const defaultValues = useMemo(() => getDefaultValues(project.config.emailConfig, project), [project]);
const { toast } = useToast();

return <FormDialog
trigger={props.trigger}
Expand Down Expand Up @@ -203,7 +204,7 @@ function EditEmailServerDialog(props: {
};

const testResult = await stackAdminApp.sendTestEmail({
recipientEmail: values.senderEmail,
recipientEmail: 'test-email-recipient@stackframe.co',
emailConfig: emailConfig,
});

Expand All @@ -222,6 +223,12 @@ function EditEmailServerDialog(props: {
}
}
});

toast({
title: "Email server updated",
description: "The email server has been updated. You can now send test emails to verify the configuration.",
variant: 'success',
});
}
}}
cancelButton
Expand Down

0 comments on commit 968dcaa

Please sign in to comment.