Skip to content

Commit

Permalink
fix: 回答を送信するとエラーが発生して画面遷移が怒らない不具合を修正
Browse files Browse the repository at this point in the history
  • Loading branch information
rito528 committed Oct 13, 2024
1 parent a37f64d commit ea1bdeb
Showing 1 changed file with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,15 +110,19 @@ const AnswerForm = ({ questions: questions, formId }: Props) => {
}),
});

const safeParsedErrorResponse = errorResponseSchema.safeParse(
await postAnswerResponse.json()
);

if (postAnswerResponse.ok) {
toggleIsSubmitted(true);
reset();
setSelectedValues({});
} else if (

return;
}

const safeParsedErrorResponse = errorResponseSchema.safeParse(
await postAnswerResponse.json()
);

if (
safeParsedErrorResponse.success &&
safeParsedErrorResponse.data.errorCode == 'OUT_OF_PERIOD'
) {
Expand Down

0 comments on commit ea1bdeb

Please sign in to comment.