Добавил роуты к desktop 22: /create
23: /quizes 24: /projects 26: /gallery
This commit is contained in:
parent
0c0c28421e
commit
0a232d26c0
@ -16,6 +16,7 @@
|
||||
"@types/react-dom": "^18.0.0",
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0",
|
||||
"react-router-dom": "^6.6.2",
|
||||
"react-scripts": "5.0.1",
|
||||
"typescript": "^4.4.2",
|
||||
"web-vitals": "^2.1.0"
|
||||
@ -54,4 +55,4 @@
|
||||
"last 1 safari version"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2,12 +2,34 @@ import React from 'react';
|
||||
import ReactDOM from 'react-dom/client';
|
||||
import './index.css';
|
||||
import App from './App';
|
||||
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';
|
||||
|
||||
const root = ReactDOM.createRoot(
|
||||
document.getElementById('root') as HTMLElement
|
||||
);
|
||||
root.render(
|
||||
<React.StrictMode>
|
||||
<App />
|
||||
</React.StrictMode>
|
||||
<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>
|
||||
);
|
||||
|
20
yarn.lock
20
yarn.lock
@ -1778,6 +1778,11 @@
|
||||
resolved "https://registry.yarnpkg.com/@popperjs/core/-/core-2.11.6.tgz#cee20bd55e68a1720bdab363ecf0c821ded4cd45"
|
||||
integrity sha512-50/17A98tWUfQ176raKiOGXuYpLyyVMkxxG6oylzL3BPOlA6ADGdK7EYunSa4I064xerltq9TGXs8HmOk5E+vw==
|
||||
|
||||
"@remix-run/router@1.2.1":
|
||||
version "1.2.1"
|
||||
resolved "https://registry.yarnpkg.com/@remix-run/router/-/router-1.2.1.tgz#812edd4104a15a493dda1ccac0b352270d7a188c"
|
||||
integrity sha512-XiY0IsyHR+DXYS5vBxpoBe/8veTeoRpMHP+vDosLZxL5bnpetzI0igkxkLZS235ldLzyfkxF+2divEwWHP3vMQ==
|
||||
|
||||
"@rollup/plugin-babel@^5.2.0":
|
||||
version "5.3.1"
|
||||
resolved "https://registry.yarnpkg.com/@rollup/plugin-babel/-/plugin-babel-5.3.1.tgz#04bc0608f4aa4b2e4b1aebf284344d0f68fda283"
|
||||
@ -7691,6 +7696,21 @@ react-refresh@^0.11.0:
|
||||
resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.11.0.tgz#77198b944733f0f1f1a90e791de4541f9f074046"
|
||||
integrity sha512-F27qZr8uUqwhWZboondsPx8tnC3Ct3SxZA3V5WyEvujRyyNv0VYPhoBg1gZ8/MV5tubQp76Trw8lTv9hzRBa+A==
|
||||
|
||||
react-router-dom@^6.6.2:
|
||||
version "6.6.2"
|
||||
resolved "https://registry.yarnpkg.com/react-router-dom/-/react-router-dom-6.6.2.tgz#bbf1f9b45855b218d22fc2d294b79408a084740a"
|
||||
integrity sha512-6SCDXxRQqW5af8ImOqKza7icmQ47/EMbz572uFjzvcArg3lZ+04PxSPp8qGs+p2Y+q+b+S/AjXv8m8dyLndIIA==
|
||||
dependencies:
|
||||
"@remix-run/router" "1.2.1"
|
||||
react-router "6.6.2"
|
||||
|
||||
react-router@6.6.2:
|
||||
version "6.6.2"
|
||||
resolved "https://registry.yarnpkg.com/react-router/-/react-router-6.6.2.tgz#556f7b56cff7fe32c5c02429fef3fcb2ecd08111"
|
||||
integrity sha512-uJPG55Pek3orClbURDvfljhqFvMgJRo59Pktywkk8hUUkTY2aRfza8Yhl/vZQXs+TNQyr6tu+uqz/fLxPICOGQ==
|
||||
dependencies:
|
||||
"@remix-run/router" "1.2.1"
|
||||
|
||||
react-scripts@5.0.1:
|
||||
version "5.0.1"
|
||||
resolved "https://registry.yarnpkg.com/react-scripts/-/react-scripts-5.0.1.tgz#6285dbd65a8ba6e49ca8d651ce30645a6d980003"
|
||||
|
Loading…
Reference in New Issue
Block a user