Skip to content

Conversation

@horororok
Copy link
Collaborator

@horororok horororok commented Dec 16, 2024

이슈 번호

close #22

변경 사항 요약

접속 끊김 모달, 저장하지 않고 나가기 모달 구현
두 모달의 경우 확인 버튼 클릭 시 페이지 초기화 필요 -> 기능은 페이지 작업 진행시 함께 작업 예정

테스트 결과

베이스(develop) 브랜치에 포함되기 위한 코드는 모두 정상적으로 작동이 되어야 합니다.

image
image

@horororok horororok added the 📁 컴포넌트 컴포넌트 개발 관련 작업 label Dec 16, 2024
@horororok horororok self-assigned this Dec 16, 2024
Copy link
Contributor

@junghwaYang junghwaYang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이전 #39 PR 이후로 추가 수정하신건가요? (Modal.tsx, WikiQuizModal.tsx, ImageUploadModal.tsx)
바뀐 내역에 포함이 되어있네요
이전 PR과 수정사항은 동일한것같습니다 확인해보시고 수정해주세요!

Comment on lines +10 to +27
<Modal isOpen={isOpen} onClose={onClose}>
<div className="flex flex-col gap-2">
<p className="text-lg font-bold">
5분 이상 글을 쓰지 않아 접속이 끊어졌어요.
</p>
<p className="text-sm">
위키 참여하기를 통해 다시 위키를 수정해 주세요.
</p>
<div className="flex justify-end">
<button
onClick={onClose}
className="mt-2 w-20 rounded-custom bg-green-200 px-6 py-2 text-background"
>
확인
</button>
</div>
</div>
</Modal>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

여기도 #39 PR 리뷰 남겨드린것처럼 컨텐츠만 분리해서 작성하는게 좋을듯합니다!

Comment on lines +19 to +24
<button
onClick={onClose}
className="mt-2 w-20 rounded-custom bg-green-200 px-6 py-2 text-background"
>
확인
</button>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

여긴 공통컴포넌트로 수정해주세요!

Comment on lines +10 to +23
<Modal isOpen={isOpen} onClose={onClose}>
<div className="flex flex-col gap-2">
<p className="text-lg font-bold">저장하지 않고 나가시겠어요?</p>
<p className="text-sm">작성하신 모든 내용이 사라집니다.</p>
<div className="flex justify-end">
<button
onClick={onClose}
className="mt-2 w-40 rounded-custom bg-red-100 px-6 py-2 text-background"
>
페이지 나가기
</button>
</div>
</div>
</Modal>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

여기도 동일하게 컨텐츠에 대한 JSX를 리턴하게끔해주세용

@junghwaYang
Copy link
Contributor

여기도 이슈 넘버 잘못들어가서 제가 수정해두었습니다~

Copy link
Collaborator

@haksoo0918 haksoo0918 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

주석도 너무 이뿌게 달아주시고, 이미지 모달에 드래그 까지 넣어주시고 수고하셨습니다. 👍

const fileInputRef = useRef<HTMLInputElement>(null);

// 선택한 이미지의 미리보기 url
const [previewUrl, setPreviewUrl] = useState<string | null>(null);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

타입이 string 이면 기본값으로 null 대신 빈값('')을 사용하셔도 될 것 같은데 null 값을 사용하신 이유가 있을까요?

Comment on lines +159 to +178
<svg
className="h-5 w-5 animate-spin"
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
>
<circle
className="opacity-25"
cx="12"
cy="12"
r="10"
stroke="currentColor"
strokeWidth="4"
/>
<path
className="opacity-75"
fill="currentColor"
d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
/>
</svg>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이 svg 도 return 안쪽이 아닌 함수 바깥이나 별도 아이콘 파일로 public 폴더에 두는것이 좋아 보입니다.

@horororok horororok closed this pull request by merging all changes into develop in 0de4e0a Dec 18, 2024
@horororok horororok deleted the feature/#22_접속-끊김-모달-컴포넌트 branch December 18, 2024 04:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

📁 컴포넌트 컴포넌트 개발 관련 작업

Projects

Status: 완료

Development

Successfully merging this pull request may close these issues.

접속 끊김 모달 컴포넌트

4 participants