Scheduling infrastructure for absolutely everyone.
fix: Fix TS error + set isPending on Button (#17118)
Alex van Andelf0cfbede7ee1
diff --git a/apps/web/modules/settings/my-account/appearance-view.tsx b/apps/web/modules/settings/my-account/appearance-view.tsxindex 791aa23c47b..d031f2cdabf 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 = ({<Formform={userAppThemeFormMethods}handleSubmit={({ appTheme }) => {- 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");- }}}><div className="border-subtle flex flex-col justify-between border-x px-6 py-8 sm:flex-row"><ThemeLabel@@ -236,6 +226,7 @@ const AppearanceView = ({</div><SectionBottomActions className="mb-6" align="end"><Button+ loading={mutation.isPending}disabled={isUserAppThemeSubmitting || !isUserAppThemeDirty}type="submit"data-testid="update-app-theme-btn"