Commit 287f9033 authored by Jiwon Yoon's avatar Jiwon Yoon
Browse files

질문수정확인, 홈화면 이미지

parent 343e8706
......@@ -19,7 +19,7 @@ export const AEssayForm = ({ element, answerQuestion }: AnswerProps) => {
<div className="flex mt-3 w-full justify-center">
<input
type="text"
className="border w-11/12 h-36 my-3"
className="border w-11/12 h-24 my-3"
id={element._id}
onChange={handleChange}
value={answer}
......
import React, { FormEvent } from "react";
import { useAuth } from "../auth/auth.context";
import SurveyImg from "../icons/surveyimg.png";
import homeImg from "../icons/homeImg.png";
export const Home = () => {
const { user } = useAuth();
......@@ -30,10 +30,10 @@ export const Home = () => {
+
</button>
</div>
<p className="text-center text-xl text-black mt-3">Create now!</p>
<p className="text-center text-xl text-black my-3">Create now!</p>
</div>
<div className="flex justify-center mt-3">
<img src={SurveyImg} className="object-scale-down justify-center" />
<div className="flex mt-5 md:px-48 bg-themeColor">
<img src={homeImg} className="m-3" />
</div>
</div>
);
......
......@@ -77,6 +77,10 @@ export const CreateSurvey = () => {
async function handleSubmit(event: FormEvent) {
event.preventDefault();
const notEditComplete = isEditing?.find((el) => el.isEditing);
if (notEditComplete) {
alert("아직 수정이 완료되지 않은 질문이 존재합니다.");
} else {
try {
const newSurvey: SurveyType = await surveyApi.editSurvey(survey);
console.log(newSurvey);
......@@ -90,6 +94,7 @@ export const CreateSurvey = () => {
setLoading(false);
}
}
}
async function addQuestion() {
try {
......
......@@ -79,6 +79,10 @@ export const EditSurvey = () => {
async function handleSubmit(event: FormEvent) {
event.preventDefault();
const notEditComplete = isEditing?.find((el) => el.isEditing);
if (notEditComplete) {
alert("아직 수정이 완료되지 않은 질문이 존재합니다.");
} else {
try {
const newSurvey: SurveyType = await surveyApi.editSurvey(survey);
console.log(newSurvey);
......@@ -92,6 +96,7 @@ export const EditSurvey = () => {
setLoading(false);
}
}
}
async function addQuestion() {
try {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment