import Navigation from "../Navigation/Navigation.tsx";
import React, {useState} from "react";
import styles from './MainComponent.module.css'
import Survey from "../Survey/Survey.tsx";

const MainComponent: React.FC = () => {
    const [activePage, setActivePage] = useState('Вопросы');

    const handleNavigationClick = (title: string) => {
        setActivePage(title);
    }

    return (
        <main className={styles.mainPage}>
            <Navigation
                activePage={activePage}
                onNavigationClick={handleNavigationClick}
            />
            <Survey />
        </main>
    )
}

export default MainComponent;