Skip to content

Commit

Permalink
feat: 에러메시지 사용자에게 알려줌, 다시하기 버튼 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
hjiwon committed Oct 14, 2023
1 parent fcda934 commit 33d5d5c
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/commons/modals/RegisterModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const RegisterModal = ({
isError,
data,
}: RegisterModalProps) => {
console.log(data);
if (isError || data?.success === false) {
return (
<div
Expand All @@ -35,13 +36,20 @@ const RegisterModal = ({
</button>
</div>
<span className="text-2xl text-brand-color">등록에 실패했습니다</span>
<div className="flex w-2/3 justify-center mt-8">
<div className="text-red-600">{data.error.message}</div>
<div className="flex w-2/3 justify-between mt-8">
<button
className="bg-brand-color rounded-md font-bold text-white w-16 py-2"
className="text-brand-color rounded-md font-bold border border-brand-color w-16 py-2"
onClick={handleRegisterMoreButtonClick}
>
확인
</button>
<button
className="bg-brand-color rounded-md font-bold text-white w-20 py-2"
onClick={handleRegisterButtonClick}
>
다시하기
</button>
</div>
</div>
</div>
Expand Down

0 comments on commit 33d5d5c

Please sign in to comment.