1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-06-30 05:56:41 -04:00

consistent arrow functions

This commit is contained in:
2025-03-12 18:10:11 -04:00
parent 6a57fde2f1
commit e61ca889a7
39 changed files with 121 additions and 126 deletions

View File

@ -79,7 +79,8 @@ export const ThemeProvider = ({ children }: PropsWithChildren) => {
id="restore-theme"
// unminified: https://gist.github.com/jakejarvis/79b0ec8506bc843023546d0d29861bf0
dangerouslySetInnerHTML={{
__html: `(()=>{try{const e=document.documentElement,t="undefined"!=typeof Storage?window.localStorage.getItem("theme"):null,a=(t&&"dark"===t)??window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";e.dataset.theme=a,e.style.colorScheme=a}catch(e){}})()`,
__html:
"(()=>{try{const e=document.documentElement,t='undefined'!=typeof Storage?window.localStorage.getItem('theme'):null,a=(t&&'dark'===t)??window.matchMedia('(prefers-color-scheme: dark)').matches?'dark':'light';e.dataset.theme=a,e.style.colorScheme=a}catch(e){}})()",
}}
/>