Skip to content

Commit c544c6b

Browse files
committed
fix: 테마 변경 후 배경 수정
1 parent 2524fd0 commit c544c6b

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/components/theme-provider.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ export function ThemeProvider({
4444
const next = prev === "light" ? "dark" : "light";
4545
document.cookie = `theme=${next};path=/;max-age=31536000;SameSite=Lax`;
4646
document.documentElement.classList.toggle("dark", next === "dark");
47+
document.documentElement.style.backgroundColor =
48+
next === "dark" ? "oklch(0.145 0 0)" : "";
4749
return next;
4850
});
4951
}, []);

0 commit comments

Comments
 (0)