39 lines
903 B
JavaScript
39 lines
903 B
JavaScript
import React from "react";
|
|
import { ThemeProvider } from "theme-ui";
|
|
import { HashRouter as Router, Switch, Route } from "react-router-dom";
|
|
|
|
import theme from "./theme.js";
|
|
import Home from "./routes/Home";
|
|
import Game from "./routes/Game";
|
|
import About from "./routes/About";
|
|
import FAQ from "./routes/FAQ";
|
|
|
|
import { AuthProvider } from "./contexts/AuthContext";
|
|
|
|
function App() {
|
|
return (
|
|
<ThemeProvider theme={theme}>
|
|
<AuthProvider>
|
|
<Router>
|
|
<Switch>
|
|
<Route path="/about">
|
|
<About />
|
|
</Route>
|
|
<Route path="/faq">
|
|
<FAQ />
|
|
</Route>
|
|
<Route path="/game/:id">
|
|
<Game />
|
|
</Route>
|
|
<Route path="/">
|
|
<Home />
|
|
</Route>
|
|
</Switch>
|
|
</Router>
|
|
</AuthProvider>
|
|
</ThemeProvider>
|
|
);
|
|
}
|
|
|
|
export default App;
|