// App.tsx
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="/surveys/:surveyId/" element={<SurveyPage/>}/>
                <Route path="/dashboard/" element={<DashboardPage/>}/>
                <Route path="*" element={<Navigate to="/"/>}/>
            </Routes>
        </Router>
    );
}