changes and improvements

This commit is contained in:
daniel31x13
2024-08-14 15:22:28 -04:00
parent d15d965139
commit 9cc3a7206e
24 changed files with 292 additions and 203 deletions
+16 -1
View File
@@ -74,7 +74,22 @@ export default function Appearance() {
const submit = async () => {
setSubmitLoader(true);
await updateUser.mutateAsync({ ...user });
const load = toast.loading(t("applying_settings"));
await updateUser.mutateAsync(
{ ...user },
{
onSettled: (data, error) => {
toast.dismiss(load);
if (error) {
toast.error(error.message);
} else {
toast.success(t("settings_applied"));
}
},
}
);
setSubmitLoader(false);
};