import { render } from 'preact' import { SOURCE_LINK } from '@/consts' import { nextTheme, theme } from '@/lib/state/theme' import * as Lucide from 'lucide-preact' import '@/styles/theme-toggle.scss' const icons = { light: Lucide.Sun, dark: Lucide.Moon, auto: Lucide.SunMoon, } function ThemeToggle() { const setNextTheme = () => { theme.value = nextTheme(theme.value) } const Icon = icons[theme.value] return ( ) } function Footer() { return ( <> Source code at {SOURCE_LINK}
locale: TODO
) } const root = document.getElementsByTagName('footer')[0] if (!root) throw new Error('Missing footer element') render(