diff --git a/SurveyFrontend/src/components/SaveButton/SaveButton.module.css b/SurveyFrontend/src/components/SaveButton/SaveButton.module.css index e4cbd6b..54d2c03 100644 --- a/SurveyFrontend/src/components/SaveButton/SaveButton.module.css +++ b/SurveyFrontend/src/components/SaveButton/SaveButton.module.css @@ -13,4 +13,5 @@ text-align: center; box-shadow: 0 0 7.4px 0 rgba(154, 202, 247, 1); box-sizing: border-box; + margin-bottom: 20px; } diff --git a/SurveyFrontend/src/components/SettingSurvey/SettingSurvey.module.css b/SurveyFrontend/src/components/SettingSurvey/SettingSurvey.module.css index fd5b485..444399f 100644 --- a/SurveyFrontend/src/components/SettingSurvey/SettingSurvey.module.css +++ b/SurveyFrontend/src/components/SettingSurvey/SettingSurvey.module.css @@ -2,7 +2,7 @@ .settingSurvey{ width: 85%; - height: 100vh; + min-height: 100vh; } .startEndTime{ diff --git a/SurveyFrontend/src/components/SettingSurvey/SettingSurvey.tsx b/SurveyFrontend/src/components/SettingSurvey/SettingSurvey.tsx index bec8a4c..a2a6568 100644 --- a/SurveyFrontend/src/components/SettingSurvey/SettingSurvey.tsx +++ b/SurveyFrontend/src/components/SettingSurvey/SettingSurvey.tsx @@ -1,26 +1,40 @@ -import React from 'react'; +import React, {useState} from 'react'; import SurveyInfo from "../SurveyInfo/SurveyInfo.tsx"; import styles from "./SettingSurvey.module.css"; import TimeEvent from "../TimeEvent/TimeEvent.tsx"; import SaveButton from "../SaveButton/SaveButton.tsx"; import {ISurvey} from "../../api/SurveyApi.ts"; -import {useOutletContext} from "react-router-dom"; +import {useLocation, useOutletContext} from "react-router-dom"; const SettingSurvey: React.FC = () => { + const location = useLocation(); + const isSettingCreatePage = location.pathname.includes('/survey/create'); const { survey, setSurvey } = useOutletContext<{ survey: ISurvey; setSurvey: (survey: ISurvey) => void; }>(); + const [descriptionSurvey, setDescriptionSurvey] = useState(''); + const [titleSurvey, setTitleSurvey] = useState(''); + return (