import React from "react";
import {Route, Routes} from "react-router-dom";

import NavBar from "components/nav_bar/NavBar.jsx";
import Forum from "components/forum/Forum.jsx";
import NotFound from "components/not_found/NotFound.jsx";
import Settings from "components/settings/Settings.jsx";
import {UserContextProvider} from "contexts/UserContext.jsx";
import {StateContextProvider} from "contexts/StateContext.jsx";

import styles from "./App.css";

export default function App() {
    return (
        <UserContextProvider>
        <StateContextProvider>
            <NavBar />
            <main className={styles.content}>
                <Routes>
                    <Route path="/*" element={<Forum />} />
                    <Route path="/settings/*" element={<Settings />} />

                    <Route path="*" element={<NotFound />} />
                </Routes>
            </main>
        </StateContextProvider>
        </UserContextProvider>
    );
}
