mirror of
https://github.com/usememos/memos.git
synced 2025-12-09 13:46:24 +08:00
fix: apply system theme dynamically (#4010)
Remove appearance comparison
This commit is contained in:
parent
43d13a3edc
commit
35cf975e76
1 changed files with 2 additions and 4 deletions
|
|
@ -34,10 +34,8 @@ const App = () => {
|
|||
useEffect(() => {
|
||||
const darkMediaQuery = window.matchMedia("(prefers-color-scheme: dark)");
|
||||
const handleColorSchemeChange = (e: MediaQueryListEvent) => {
|
||||
if (commonContext.appearance === "system") {
|
||||
const mode = e.matches ? "dark" : "light";
|
||||
setMode(mode);
|
||||
}
|
||||
const mode = e.matches ? "dark" : "light";
|
||||
setMode(mode);
|
||||
};
|
||||
|
||||
try {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue