import { useEffect } from 'react'; import { Route, Routes, useLocation } from 'react-router-dom'; import Home from './views/home'; import styles from './app.module.css'; import useTheme from './hooks/use-theme'; import Subplebbit from './views/subplebbit'; import { isHomeView } from './lib/utils/view-utils'; const App = () => { const [theme] = useTheme(); const location = useLocation(); const isInHomeView = isHomeView(location.pathname); useEffect(() => { document.body.classList.forEach((className) => document.body.classList.remove(className)); document.body.classList.add(theme); }, [theme]); return (