33 lines
1.1 KiB
TypeScript
33 lines
1.1 KiB
TypeScript
import { Routes, Route } from "react-router-dom";
|
|
import { ProvideSettings } from "./context/settings";
|
|
// import Snowfall from "react-snowfall";
|
|
import { ToastContainer } from "react-toastify";
|
|
import { SocketContext, socket } from "./context/socket";
|
|
import StatsPage from "./pages/StatsPage";
|
|
import App from "./App";
|
|
|
|
export const STATS_URL = '/stats';
|
|
|
|
export default function AppRoutes() {
|
|
return (
|
|
<Routes>
|
|
<Route path={STATS_URL} element={<StatsPage />} />
|
|
<Route path="/" element={
|
|
<ProvideSettings>
|
|
<SocketContext.Provider value={socket}>
|
|
<>
|
|
{/* <Snowfall style={{
|
|
zIndex: 2,
|
|
position: 'fixed',
|
|
width: '100vw',
|
|
height: '100vh'
|
|
}} /> */}
|
|
<App />
|
|
</>
|
|
<ToastContainer />
|
|
</SocketContext.Provider>
|
|
</ProvideSettings>
|
|
} />
|
|
</Routes>
|
|
);
|
|
} |