Skip to content

Commit

Permalink
fix: 정답 제출 API 변경 사항 반영
Browse files Browse the repository at this point in the history
[#2]
  • Loading branch information
YuHyun-P committed Dec 4, 2023
1 parent 400cc48 commit aa60a38
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion packages/frontend/src/pages/quizzes/[id].page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ export default function QuizPage({ quiz }: { quiz: Quiz }) {
try {
const response = await quizAPI.submit(+id);
if (response.solved) {
solvedModal.onSolved(response.link);
const shareLink = `${process.env.NEXT_PUBLIC_BASE_URL}${BROWSWER_PATH.SHARE}/${response.slug}`;
solvedModal.onSolved(shareLink);
return;
}
toast.error("다시 풀어보세요!");
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/types/quiz.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export type QuizSolve = QuizSolveCorrect | QuizSolveWrong;

export type QuizSolveCorrect = {
solved: true;
link: string;
slug: string;
};

export type QuizSolveWrong = {
Expand Down

0 comments on commit aa60a38

Please sign in to comment.