import { useEffect, useState } from 'react' import { WiMoonAltWaxingCrescent1, WiMoonAltWaxingGibbous6 } from 'react-icons/wi' import { AiOutlineGithub } from 'react-icons/ai' import * as allIcons from 'ccy-icons' import { Stack } from './components/Stack' import { Button } from './components/Button' import './App.scss' function toFileName(componentName: string) { let lowerName = componentName.toLocaleLowerCase() if (lowerName.startsWith('_')) { lowerName = lowerName.substring(1) } return `${lowerName}.svg` } function App() { const [theme, setTheme] = useState<'light' | 'dark'>('dark') useEffect(() => { if (theme === 'light') { document.documentElement.classList.remove('dark-theme') document.documentElement.classList.add('light-theme') } else { document.documentElement.classList.remove('light-theme') document.documentElement.classList.add('dark-theme') } }, [theme]) return (