before show
This commit is contained in:
16
src/App.tsx
16
src/App.tsx
@@ -1,14 +1,24 @@
|
||||
// App.tsx
|
||||
import {BrowserRouter as Router, Routes, Route, Navigate} from 'react-router-dom';
|
||||
import {BrowserRouter as Router, Routes, Route, Navigate, Link} from 'react-router-dom';
|
||||
import React from "react";
|
||||
import {MainPage} from "./pages/MainPage.tsx";
|
||||
import {SurveyPage} from "./pages/SurveyPage.tsx";
|
||||
import {DashboardPage} from "./pages/DashboardPage.tsx";
|
||||
|
||||
|
||||
|
||||
export default function App() {
|
||||
return (
|
||||
<Router>
|
||||
<div className="header">
|
||||
<Link to="/dashboard" className="menu-button">☰</Link>
|
||||
<h1 className="logo">Pro-Fi Test</h1>
|
||||
</div>
|
||||
<Routes>
|
||||
<Route path="/" element={<MainPage />} />
|
||||
<Route path="*" element={<Navigate to="/" />} />
|
||||
<Route path="/" element={<MainPage/>}/>
|
||||
<Route path="/surveys/:surveyId/" element={<SurveyPage/>}/>
|
||||
<Route path="/dashboard/" element={<DashboardPage/>}/>
|
||||
<Route path="*" element={<Navigate to="/"/>}/>
|
||||
</Routes>
|
||||
</Router>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user