-
Notifications
You must be signed in to change notification settings - Fork 2
Feature/#22 접속 끊김 모달 컴포넌트 #40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The head ref may contain hidden characters: "feature/#22_\uC811\uC18D-\uB04A\uAE40-\uBAA8\uB2EC-\uCEF4\uD3EC\uB10C\uD2B8"
Conversation
junghwaYang
left a comment
There was a problem hiding this 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과 수정사항은 동일한것같습니다 확인해보시고 수정해주세요!
| <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> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
여기도 #39 PR 리뷰 남겨드린것처럼 컨텐츠만 분리해서 작성하는게 좋을듯합니다!
| <button | ||
| onClick={onClose} | ||
| className="mt-2 w-20 rounded-custom bg-green-200 px-6 py-2 text-background" | ||
| > | ||
| 확인 | ||
| </button> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
여긴 공통컴포넌트로 수정해주세요!
| <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> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
여기도 동일하게 컨텐츠에 대한 JSX를 리턴하게끔해주세용
|
여기도 이슈 넘버 잘못들어가서 제가 수정해두었습니다~ |
haksoo0918
left a comment
There was a problem hiding this 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); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
타입이 string 이면 기본값으로 null 대신 빈값('')을 사용하셔도 될 것 같은데 null 값을 사용하신 이유가 있을까요?
| <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> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이 svg 도 return 안쪽이 아닌 함수 바깥이나 별도 아이콘 파일로 public 폴더에 두는것이 좋아 보입니다.
이슈 번호
close #22
변경 사항 요약
접속 끊김 모달, 저장하지 않고 나가기 모달 구현
두 모달의 경우 확인 버튼 클릭 시 페이지 초기화 필요 -> 기능은 페이지 작업 진행시 함께 작업 예정
테스트 결과
베이스(develop) 브랜치에 포함되기 위한 코드는 모두 정상적으로 작동이 되어야 합니다.