Skip to content

armgit / plane

Public Imported from GitHub
0

πŸ”₯πŸ”₯πŸ”₯ Open-source Jira, Linear, Monday, and ClickUp alternative. Plane is a modern project management platform to manage tasks, sprints, docs, and triage.

[WEB-1465] fix: theme fluctuation on initial load. (#4638)

Prateek Shourya10ef4e657ffb
diff --git a/web/lib/wrappers/store-wrapper.tsx b/web/lib/wrappers/store-wrapper.tsx
index e4e191d5a2..785e929eae 100644
--- a/web/lib/wrappers/store-wrapper.tsx
+++ b/web/lib/wrappers/store-wrapper.tsx
@@ -14,7 +14,7 @@ type TStoreWrapper = {
const StoreWrapper: FC<TStoreWrapper> = observer((props) => {
const { children } = props;
// theme
- const { setTheme } = useTheme();
+ const {resolvedTheme, setTheme } = useTheme();
// router
const router = useRouter();
// store hooks
@@ -38,7 +38,7 @@ const StoreWrapper: FC<TStoreWrapper> = observer((props) => {
* Setting up the theme of the user by fetching it from local storage
*/
useEffect(() => {
- setTheme(userProfile?.theme?.theme || "system");
+ setTheme(userProfile?.theme?.theme || resolvedTheme || "system");
if (!userProfile?.theme?.theme) return;
if (userProfile?.theme?.theme === "custom" && userProfile?.theme?.palette) {