import AppRoutes from "./routes/routes";
import { useEffect } from "react";

function App() {

    const checkTheme = () => {
        if (localStorage.theme ? (localStorage.theme === "dark") : (window.matchMedia("(prefers-color-scheme: dark)").matches)) {
            document.documentElement.classList.add("dark");
        }
    };

    useEffect(() => {
        checkTheme();
    }, []);
    return (
        <AppRoutes />
    );
}

export default App;