2022-05-23 19:07:42 +00:00
|
|
|
import React from 'react';
|
|
|
|
import ReactDOM from 'react-dom/client';
|
2022-12-03 21:37:21 +00:00
|
|
|
import './index.css';
|
|
|
|
import App from './App';
|
2023-01-15 22:13:18 +00:00
|
|
|
import { BrowserRouter, Route, Routes } from 'react-router-dom';
|
|
|
|
import FirstQuiz from './components/FirstQuiz';
|
|
|
|
import lightTheme from "./utils/themes/light";
|
|
|
|
import { ThemeProvider } from '@mui/material';
|
|
|
|
import Navbar from './components/Navbar/Navbar';
|
|
|
|
import CreateQuiz from './components/CreateQuiz/CreateQuiz';
|
|
|
|
import NavbarCreateQuiz from './components/Navbar/NavbarCreateQuiz';
|
|
|
|
import MyQuizzes from './components/MyQuizzes';
|
|
|
|
import QuizGallery from './components/QuizGallery';
|
2022-05-23 19:07:42 +00:00
|
|
|
|
|
|
|
const root = ReactDOM.createRoot(
|
2022-12-03 21:37:21 +00:00
|
|
|
document.getElementById('root') as HTMLElement
|
2022-05-23 19:07:42 +00:00
|
|
|
);
|
|
|
|
root.render(
|
2022-12-03 21:37:21 +00:00
|
|
|
<React.StrictMode>
|
2023-01-15 22:13:18 +00:00
|
|
|
<ThemeProvider theme={lightTheme}>
|
|
|
|
<BrowserRouter>
|
|
|
|
<Routes>
|
|
|
|
<Route path="/" element={ <App /> } />
|
|
|
|
<Route path="/create" element={<><Navbar isLoggedIn={true} /><FirstQuiz/></>} />
|
|
|
|
<Route path="/quizes" element={<><Navbar isLoggedIn={true} /></>}/>
|
|
|
|
<Route path="/projects" element={<><Navbar isLoggedIn={true} /> <MyQuizzes /></>} />
|
|
|
|
<Route path="/gallery" element={<><Navbar isLoggedIn={true} /><QuizGallery /></>} />
|
|
|
|
<Route path="/create/type" element={<><NavbarCreateQuiz /></>} />
|
|
|
|
<Route path="/create/start" element={<><NavbarCreateQuiz /></>} />
|
|
|
|
<Route path="/create/settings" element={<><NavbarCreateQuiz /><CreateQuiz /></>} />
|
|
|
|
</Routes>
|
|
|
|
</BrowserRouter>
|
|
|
|
</ThemeProvider>
|
|
|
|
</React.StrictMode>
|
2022-12-03 21:37:21 +00:00
|
|
|
);
|