Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
students
survey
Commits
287f9033
Commit
287f9033
authored
Jul 27, 2022
by
Jiwon Yoon
Browse files
질문수정확인, 홈화면 이미지
parent
343e8706
Changes
5
Show whitespace changes
Inline
Side-by-side
frontend/src/answers/AEssayForm.tsx
View file @
287f9033
...
@@ -19,7 +19,7 @@ export const AEssayForm = ({ element, answerQuestion }: AnswerProps) => {
...
@@ -19,7 +19,7 @@ export const AEssayForm = ({ element, answerQuestion }: AnswerProps) => {
<
div
className
=
"flex mt-3 w-full justify-center"
>
<
div
className
=
"flex mt-3 w-full justify-center"
>
<
input
<
input
type
=
"text"
type
=
"text"
className
=
"border w-11/12 h-
36
my-3"
className
=
"border w-11/12 h-
24
my-3"
id
=
{
element
.
_id
}
id
=
{
element
.
_id
}
onChange
=
{
handleChange
}
onChange
=
{
handleChange
}
value
=
{
answer
}
value
=
{
answer
}
...
...
frontend/src/home/Home.tsx
View file @
287f9033
import
React
,
{
FormEvent
}
from
"
react
"
;
import
React
,
{
FormEvent
}
from
"
react
"
;
import
{
useAuth
}
from
"
../auth/auth.context
"
;
import
{
useAuth
}
from
"
../auth/auth.context
"
;
import
Survey
Img
from
"
../icons/
surveyi
mg.png
"
;
import
home
Img
from
"
../icons/
homeI
mg.png
"
;
export
const
Home
=
()
=>
{
export
const
Home
=
()
=>
{
const
{
user
}
=
useAuth
();
const
{
user
}
=
useAuth
();
...
@@ -30,10 +30,10 @@ export const Home = () => {
...
@@ -30,10 +30,10 @@ export const Home = () => {
+
+
</
button
>
</
button
>
</
div
>
</
div
>
<
p
className
=
"text-center text-xl text-black m
t
-3"
>
Create now!
</
p
>
<
p
className
=
"text-center text-xl text-black m
y
-3"
>
Create now!
</
p
>
</
div
>
</
div
>
<
div
className
=
"flex
justify-center mt-3
"
>
<
div
className
=
"flex
mt-5 md:px-48 bg-themeColor
"
>
<
img
src
=
{
Survey
Img
}
className
=
"
object-scale-down justify-center
"
/>
<
img
src
=
{
home
Img
}
className
=
"
m-3
"
/>
</
div
>
</
div
>
</
div
>
</
div
>
);
);
...
...
frontend/src/icons/homeImg.png
0 → 100644
View file @
287f9033
415 KB
frontend/src/survey/CreateSurvey.tsx
View file @
287f9033
...
@@ -77,6 +77,10 @@ export const CreateSurvey = () => {
...
@@ -77,6 +77,10 @@ export const CreateSurvey = () => {
async
function
handleSubmit
(
event
:
FormEvent
)
{
async
function
handleSubmit
(
event
:
FormEvent
)
{
event
.
preventDefault
();
event
.
preventDefault
();
const
notEditComplete
=
isEditing
?.
find
((
el
)
=>
el
.
isEditing
);
if
(
notEditComplete
)
{
alert
(
"
아직 수정이 완료되지 않은 질문이 존재합니다.
"
);
}
else
{
try
{
try
{
const
newSurvey
:
SurveyType
=
await
surveyApi
.
editSurvey
(
survey
);
const
newSurvey
:
SurveyType
=
await
surveyApi
.
editSurvey
(
survey
);
console
.
log
(
newSurvey
);
console
.
log
(
newSurvey
);
...
@@ -90,6 +94,7 @@ export const CreateSurvey = () => {
...
@@ -90,6 +94,7 @@ export const CreateSurvey = () => {
setLoading
(
false
);
setLoading
(
false
);
}
}
}
}
}
async
function
addQuestion
()
{
async
function
addQuestion
()
{
try
{
try
{
...
...
frontend/src/survey/EditSurvey.tsx
View file @
287f9033
...
@@ -79,6 +79,10 @@ export const EditSurvey = () => {
...
@@ -79,6 +79,10 @@ export const EditSurvey = () => {
async
function
handleSubmit
(
event
:
FormEvent
)
{
async
function
handleSubmit
(
event
:
FormEvent
)
{
event
.
preventDefault
();
event
.
preventDefault
();
const
notEditComplete
=
isEditing
?.
find
((
el
)
=>
el
.
isEditing
);
if
(
notEditComplete
)
{
alert
(
"
아직 수정이 완료되지 않은 질문이 존재합니다.
"
);
}
else
{
try
{
try
{
const
newSurvey
:
SurveyType
=
await
surveyApi
.
editSurvey
(
survey
);
const
newSurvey
:
SurveyType
=
await
surveyApi
.
editSurvey
(
survey
);
console
.
log
(
newSurvey
);
console
.
log
(
newSurvey
);
...
@@ -92,6 +96,7 @@ export const EditSurvey = () => {
...
@@ -92,6 +96,7 @@ export const EditSurvey = () => {
setLoading
(
false
);
setLoading
(
false
);
}
}
}
}
}
async
function
addQuestion
()
{
async
function
addQuestion
()
{
try
{
try
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment