👽 added async to api calls
Co-authored-by: Sindre Kjelsrud <kjelsrudsindre@gmail.com>
This commit is contained in:
parent
14c24ae97e
commit
f417e575ea
8 changed files with 17 additions and 11 deletions
|
|
@ -15,12 +15,13 @@
|
|||
goto(`${questionNum - 1}`)
|
||||
}
|
||||
|
||||
const handleFormSubmit = () => {
|
||||
const handleFormSubmit = async () => {
|
||||
let allFormAnswers:string | null = localStorage.getItem("allFormAnswers")
|
||||
let respondentID:string | null = localStorage.getItem("RespondentId")
|
||||
|
||||
if (allFormAnswers && respondentID) {
|
||||
postFormData(Number(respondentID), allFormAnswers)
|
||||
await postFormData(Number(respondentID), allFormAnswers)
|
||||
goto("/evaluation")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Reference in a new issue