2025-05-30 19:32:58 +03:00
|
|
|
// App.tsx
|
2025-05-31 10:57:27 +03:00
|
|
|
import {BrowserRouter as Router, Routes, Route, Navigate, Link} from 'react-router-dom';
|
2025-05-30 19:32:58 +03:00
|
|
|
import React from "react";
|
|
|
|
|
import {MainPage} from "./pages/MainPage.tsx";
|
2025-05-31 10:57:27 +03:00
|
|
|
import {SurveyPage} from "./pages/SurveyPage.tsx";
|
|
|
|
|
import {DashboardPage} from "./pages/DashboardPage.tsx";
|
|
|
|
|
|
|
|
|
|
|
2025-05-19 19:24:27 +03:00
|
|
|
|
2025-05-30 19:32:58 +03:00
|
|
|
export default function App() {
|
|
|
|
|
return (
|
|
|
|
|
<Router>
|
2025-05-31 10:57:27 +03:00
|
|
|
<div className="header">
|
|
|
|
|
<Link to="/dashboard" className="menu-button">☰</Link>
|
|
|
|
|
<h1 className="logo">Pro-Fi Test</h1>
|
|
|
|
|
</div>
|
2025-05-30 19:32:58 +03:00
|
|
|
<Routes>
|
2025-05-31 10:57:27 +03:00
|
|
|
<Route path="/" element={<MainPage/>}/>
|
|
|
|
|
<Route path="/surveys/:surveyId/" element={<SurveyPage/>}/>
|
|
|
|
|
<Route path="/dashboard/" element={<DashboardPage/>}/>
|
|
|
|
|
<Route path="*" element={<Navigate to="/"/>}/>
|
2025-05-30 19:32:58 +03:00
|
|
|
</Routes>
|
|
|
|
|
</Router>
|
|
|
|
|
);
|
|
|
|
|
}
|