before show

This commit is contained in:
Mikan
2025-05-31 10:57:27 +03:00
parent 90d12b57ec
commit a37118dc6a
7 changed files with 139 additions and 26 deletions

View File

@@ -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>
);