From ae51520966e353b861f0a35c4198213abf4c911e Mon Sep 17 00:00:00 2001 From: Tatiana Nikolaeva Date: Tue, 15 Apr 2025 23:13:18 +0500 Subject: [PATCH] open page settings --- .../MainComponent/MainComponent.tsx | 4 +++- .../NavigationItem/NavigationItem.tsx | 2 +- .../SettingSurvey/SettingSurvey.module.css | 6 ++++++ .../SettingSurvey/SettingSurvey.tsx | 14 +++++++++++++ .../src/components/TimeEvent/TimeEvent.tsx | 20 +++++++++++++++++++ SurveyFrontend/src/pages/Results.tsx | 11 ++++++++++ SurveyFrontend/src/pages/Settings.tsx | 15 ++++++++++++++ 7 files changed, 70 insertions(+), 2 deletions(-) create mode 100644 SurveyFrontend/src/components/SettingSurvey/SettingSurvey.module.css create mode 100644 SurveyFrontend/src/components/SettingSurvey/SettingSurvey.tsx create mode 100644 SurveyFrontend/src/components/TimeEvent/TimeEvent.tsx diff --git a/SurveyFrontend/src/components/MainComponent/MainComponent.tsx b/SurveyFrontend/src/components/MainComponent/MainComponent.tsx index 9ee2f41..c5d5cc9 100644 --- a/SurveyFrontend/src/components/MainComponent/MainComponent.tsx +++ b/SurveyFrontend/src/components/MainComponent/MainComponent.tsx @@ -2,6 +2,7 @@ import Navigation from "../Navigation/Navigation.tsx"; import React, {useState} from "react"; import styles from './MainComponent.module.css' import Survey from "../Survey/Survey.tsx"; +import SettingSurvey from "../SettingSurvey/SettingSurvey.tsx"; const MainComponent: React.FC = () => { const [activePage, setActivePage] = useState('Вопросы'); @@ -16,7 +17,8 @@ const MainComponent: React.FC = () => { activePage={activePage} onNavigationClick={handleNavigationClick} /> - + { activePage === 'Вопросы' && } + {activePage === 'Настройки' && } ) } diff --git a/SurveyFrontend/src/components/NavigationItem/NavigationItem.tsx b/SurveyFrontend/src/components/NavigationItem/NavigationItem.tsx index 743b9ee..1ef2735 100644 --- a/SurveyFrontend/src/components/NavigationItem/NavigationItem.tsx +++ b/SurveyFrontend/src/components/NavigationItem/NavigationItem.tsx @@ -4,7 +4,7 @@ import styles from './NavigationItem.module.css' interface NavigationItemProps{ title: string; onClick(): void; - isActive: boolean; //Дописать для активной ссылки, для класса + isActive: boolean; } const NavigationItem: React.FC = ({title, onClick, isActive}) => { diff --git a/SurveyFrontend/src/components/SettingSurvey/SettingSurvey.module.css b/SurveyFrontend/src/components/SettingSurvey/SettingSurvey.module.css new file mode 100644 index 0000000..1ba1e33 --- /dev/null +++ b/SurveyFrontend/src/components/SettingSurvey/SettingSurvey.module.css @@ -0,0 +1,6 @@ +/*SettingSurvey.module.css*/ + +.settingSurvey{ + width: 65%; + margin-left: 8.9%; +} \ No newline at end of file diff --git a/SurveyFrontend/src/components/SettingSurvey/SettingSurvey.tsx b/SurveyFrontend/src/components/SettingSurvey/SettingSurvey.tsx new file mode 100644 index 0000000..f391dfb --- /dev/null +++ b/SurveyFrontend/src/components/SettingSurvey/SettingSurvey.tsx @@ -0,0 +1,14 @@ +import React from 'react'; +import SurveyInfo from "../SurveyInfo/SurveyInfo.tsx"; +import styles from "./SettingSurvey.module.css"; + + +const SettingSurvey: React.FC = () => { + return ( +
+ +
+ ) +} + +export default SettingSurvey; \ No newline at end of file diff --git a/SurveyFrontend/src/components/TimeEvent/TimeEvent.tsx b/SurveyFrontend/src/components/TimeEvent/TimeEvent.tsx new file mode 100644 index 0000000..9eed782 --- /dev/null +++ b/SurveyFrontend/src/components/TimeEvent/TimeEvent.tsx @@ -0,0 +1,20 @@ +import React from 'react'; + + +interface TimeEventProps { + title: string; + +} + +const TimeEvent: React.FC = ({title}) => { + return ( +
+

{title}

+
+ +
+
+ ); +}; + +export default TimeEvent; \ No newline at end of file diff --git a/SurveyFrontend/src/pages/Results.tsx b/SurveyFrontend/src/pages/Results.tsx index e69de29..429ae09 100644 --- a/SurveyFrontend/src/pages/Results.tsx +++ b/SurveyFrontend/src/pages/Results.tsx @@ -0,0 +1,11 @@ +import React from 'react'; +import Header from "../components/Header/Header.tsx"; + + +const Results: React.FC = () => { + return ( +
+ ) +} + +export default Results; \ No newline at end of file diff --git a/SurveyFrontend/src/pages/Settings.tsx b/SurveyFrontend/src/pages/Settings.tsx index e69de29..5666a55 100644 --- a/SurveyFrontend/src/pages/Settings.tsx +++ b/SurveyFrontend/src/pages/Settings.tsx @@ -0,0 +1,15 @@ +import React from 'react'; +import Header from "../components/Header/Header.tsx"; +import MainComponent from "../components/MainComponent/MainComponent.tsx"; + + +const Settings: React.FC = () => { + return ( + <> +
+ + + ); +}; + +export default Settings; \ No newline at end of file