Files
vantage-app/site/components/ThemeScript.tsx
T
2026-07-24 09:51:30 +01:00

17 lines
327 B
TypeScript

const script = `
(function(){
try {
var t = localStorage.getItem("vantage-theme");
if (t === "light" || t === "dark") {
document.documentElement.setAttribute("data-theme", t);
}
} catch (e) {}
})();
`;
export function ThemeScript() {
return <script dangerouslySetInnerHTML={{ __html: script }} />;
}