fix: urgent! sooo urgent!!

This commit is contained in:
not-nullptr
2024-11-15 14:13:13 +00:00
parent 02cf3d8d41
commit 3d1c3705c3

View File

@@ -1,3 +1,4 @@
import { browser } from "$app/environment";
import { log } from "$lib/logger";
import { VertFile } from "$lib/types";
import JSCookie from "js-cookie";
@@ -16,9 +17,10 @@ class Theme {
expires: 2147483647,
});
log(["theme"], `set to ${this.dark ? "dark" : "light"}`);
window.plausible("Theme set", {
props: { theme: theme.dark ? "dark" : "light" },
});
if (browser)
window.plausible("Theme set", {
props: { theme: theme.dark ? "dark" : "light" },
});
};
}