From f0cfbede7ee1e03e3c75b891b306927c53359a16 Mon Sep 17 00:00:00 2001 From: Alex van Andel Date: Tue, 15 Oct 2024 14:59:31 +0100 Subject: [PATCH] fix: Fix TS error + set isPending on Button (#17118) --- .../settings/my-account/appearance-view.tsx | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/apps/web/modules/settings/my-account/appearance-view.tsx b/apps/web/modules/settings/my-account/appearance-view.tsx index 791aa23c47..d031f2cdab 100644 --- a/apps/web/modules/settings/my-account/appearance-view.tsx +++ b/apps/web/modules/settings/my-account/appearance-view.tsx @@ -193,20 +193,10 @@ const AppearanceView = ({
{ - if (appTheme === "light" || appTheme === "dark") { - mutation.mutate({ - appTheme, - }); - return; - } + if (appTheme === "system") appTheme = null; mutation.mutate({ - appTheme: null, + appTheme, }); - if (values.appTheme === "light") { - document.body.classList.remove("dark"); - } else if (values.appTheme === "dark") { - document.body.classList.remove("light"); - } }}>