mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
fix: apply system theme dynamically (#4010)
Remove appearance comparison
This commit is contained in:
@@ -34,10 +34,8 @@ const App = () => {
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const darkMediaQuery = window.matchMedia("(prefers-color-scheme: dark)");
|
const darkMediaQuery = window.matchMedia("(prefers-color-scheme: dark)");
|
||||||
const handleColorSchemeChange = (e: MediaQueryListEvent) => {
|
const handleColorSchemeChange = (e: MediaQueryListEvent) => {
|
||||||
if (commonContext.appearance === "system") {
|
|
||||||
const mode = e.matches ? "dark" : "light";
|
const mode = e.matches ? "dark" : "light";
|
||||||
setMode(mode);
|
setMode(mode);
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
Reference in New Issue
Block a user