add fix button loading state

This commit is contained in:
Alex Holliday committed 2025-06-20 10:08:13 +08:00
1 parent 906a76c545
commit 1187f9d4cc
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -161,7 +161,7 @@ const useTestNotification = () => {
} catch (error) { } catch (error) {
setError(error); setError(error);
createToast({ createToast({
body: t("notifications.test.failed"), body: error?.response?.data?.msg || t("notifications.test.failed"),
}); });
} finally { } finally {
setIsLoading(false); setIsLoading(false);
@@ -204,7 +204,7 @@ const CreateNotifications = () => {
spacing={theme.spacing(2)} spacing={theme.spacing(2)}
> >
<Button <Button
loading={isCreating || isEditing || notificationIsLoading} loading={isTesting}
variant="contained" variant="contained"
color="secondary" color="secondary"
onClick={onTestNotification} onClick={onTestNotification}