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
58dede47
Commit
58dede47
authored
Jul 26, 2022
by
Yoon, Daeki
😅
Browse files
테스트를 위해서 설문조사 여부 localStorage에서 sessionStorage로 변경
parent
0d4d491e
Changes
1
Show whitespace changes
Inline
Side-by-side
frontend/src/answers/AnswerSurveyForm.tsx
View file @
58dede47
...
@@ -32,7 +32,7 @@ export const AnswerSurveyForm = () => {
...
@@ -32,7 +32,7 @@ export const AnswerSurveyForm = () => {
ansSurvey
();
ansSurvey
();
},
[
surveyId
]);
},
[
surveyId
]);
const
isSurvey
=
local
Storage
.
getItem
(
`survey_
${
surveyId
}
`
);
const
isSurvey
=
session
Storage
.
getItem
(
`survey_
${
surveyId
}
`
);
if
(
isSurvey
)
{
if
(
isSurvey
)
{
console
.
log
(
"
object
"
,
isSurvey
);
console
.
log
(
"
object
"
,
isSurvey
);
...
@@ -88,7 +88,7 @@ export const AnswerSurveyForm = () => {
...
@@ -88,7 +88,7 @@ export const AnswerSurveyForm = () => {
});
});
const
newAnswer
:
AnswerType
=
await
answerApi
.
saveAnswers
(
formData
);
const
newAnswer
:
AnswerType
=
await
answerApi
.
saveAnswers
(
formData
);
console
.
log
(
newAnswer
);
console
.
log
(
newAnswer
);
local
Storage
.
setItem
(
`survey_
${
surveyId
}
`
,
surveyId
??
""
);
session
Storage
.
setItem
(
`survey_
${
surveyId
}
`
,
surveyId
??
""
);
navigate
(
"
/survey/complete
"
);
navigate
(
"
/survey/complete
"
);
setSuccess
(
true
);
setSuccess
(
true
);
...
...
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