Fix bug in error handler response handling

Change background of Sonner
This commit is contained in:
grimsi
2024-06-08 16:05:25 +02:00
parent 96c89662ec
commit 273e9b0a07
4 changed files with 25 additions and 17 deletions
+4 -8
View File
@@ -94,17 +94,13 @@ function SetupView() {
initialValues={{username: '', email: '', password: '', passwordRepeat: ''}}
onSubmit={
async (values: any) => {
try {
await SetupEndpoint.registerSuperAdmin({
await SetupEndpoint.registerSuperAdmin({
username: values.username,
password: values.password,
email: values.email
});
toast.success("Setup finished", {description: "Have fun with Gameyfin!"});
navigate('/login');
} catch (e) {
alert("An error occurred while completing the setup. Please try again.")
}
});
toast.success("Setup finished", {description: "Have fun with Gameyfin!"});
navigate('/login');
}
}
>