π₯π₯π₯ Open-source Jira, Linear, Monday, and ClickUp alternative. Plane is a modern project management platform to manage tasks, sprints, docs, and triage.
TypeScript boardsbug-trackerdjangodockerganttissue-trackerjirajira-alternativekanbanlinearpostgresqlproduct-managementproject-managementproject-planningpythonreactredistypesciptvitework-management
[WEB-5772] chore: theme switcher code refactor #8438
Anmol Singh Bhatiad09c91b8383d
diff --git a/apps/web/app/(all)/profile/appearance/page.tsx b/apps/web/app/(all)/profile/appearance/page.tsxindex 0104310217..d0d05588d8 100644--- a/apps/web/app/(all)/profile/appearance/page.tsx+++ b/apps/web/app/(all)/profile/appearance/page.tsx@@ -63,9 +63,7 @@ function ProfileAppearancePage() {// Wait for the promise to resolve, then reload after showing toasttry {await updateCurrentUserThemePromise;- setTimeout(() => {- window.location.reload();- }, 1500);+ window.location.reload();} catch (error) {// Error toast already shown by setPromiseToastconsole.error("Error updating theme:", error);diff --git a/apps/web/ce/components/preferences/theme-switcher.tsx b/apps/web/ce/components/preferences/theme-switcher.tsxindex 9de9b96162..d6e6dc252c 100644--- a/apps/web/ce/components/preferences/theme-switcher.tsx+++ b/apps/web/ce/components/preferences/theme-switcher.tsx@@ -67,9 +67,7 @@ export const ThemeSwitcher = observer(function ThemeSwitcher(props: {});// Wait for the promise to resolve, then reload after showing toastawait updatePromise;- setTimeout(() => {- window.location.reload();- }, 1500);+ window.location.reload();} catch (error) {console.error("Error updating theme:", error);}diff --git a/apps/web/core/components/power-k/config/preferences-commands.ts b/apps/web/core/components/power-k/config/preferences-commands.tsindex 116b0ddba9..6e6ad8e864 100644--- a/apps/web/core/components/power-k/config/preferences-commands.ts+++ b/apps/web/core/components/power-k/config/preferences-commands.ts@@ -32,9 +32,7 @@ export const usePowerKPreferencesCommands = (): TPowerKCommandConfig[] => {message: "Reloading to apply changes...",});// reload the page after showing the toast- setTimeout(() => {- window.location.reload();- }, 1500);+ window.location.reload();return;}).catch(() => {