-
Notifications
You must be signed in to change notification settings - Fork 2
feat : 관리자 & 신고 2차 구현 #77
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
Conversation
nirii00
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.
수고하셨습니다~
| if (callBack) callBack(); | ||
| console.log(res.data.data); | ||
| const res = await client.post(`/api/reports`, postReportRequest); | ||
| if (res.status === 200) { |
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.
제가 알기로는 axios가 status 가200번대를 제외하고는 무조건 error를 반환하도록 하는 걸로 알고 있는데, 200만 특정해서 리턴한 이유가 있을까요?
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.
아하 큰 뜻은 없는데 좀 더 true임을 명확하게 표현해주는거 같아서..? 썻습니다 ㅎ
| alert('신고 처리되었습니다.'); | ||
| onClose(); | ||
| } else if (res?.status === 409) { | ||
| alert('신고한 이력이 있습니다.'); |
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.
alert를 toastUI로 대체한다는 말씀이신거죠?
저도 alert를 좀 만들어둬야겠네요
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.
네넹 토스트UI 만들고나면 대부분 alert들을 교체할 거 같습니다!
| page: '1', | ||
| size: '3', | ||
| }); | ||
| const handleGetReports = async (reportQueryString: ReportQueryString) => { |
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.
여기 에러난 경우 예외처리를 해줘야하지 않을까요?
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.
엇 예외처리가 빠져있군요.. 다음 pr에 추가해놓겠습니다!
tifsy
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.
수고하셨습니다!
| return res; | ||
| } | ||
| } catch (error) { | ||
| console.error(error); |
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.
throw error로 에러를 던져주면 좋을 것 같습니다!
| alert('신고 처리되었습니다.'); | ||
| onClose(); | ||
| } else if (res?.status === 409) { | ||
| alert('신고한 이력이 있습니다.'); |
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.
저도 alert 창으로 사용자에게 안내 메시지를 보내야 할 경우가 꽤 있어서 모달 컴포넌트를 따로 만들어서 사용하는 게 좋을 것 같네요!!!
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.
네넹 토스트UI를 만들어보려 합니다!
| <WrapperTitle title="필터링 단어" Icon={AlarmIcon} /> | ||
| <div className="mt-5 flex w-full flex-wrap gap-4"> | ||
| {badWords.map((badWord, idx) => { | ||
| return ( |
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만 반환하도록 하고 () 를 사용하면 더 가독성이 좋을 것 같아요!
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.
오 맞다 그 방법이 더 좋은거 같네요!! 다음에 바꾸겠습니당🥕🥕
| {badWord.word} | ||
| <button> | ||
| <CancelIcon className="h-4 w-4" /> | ||
| </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.
클릭했을 때의 동작이 필요할 것 같습니다! 추후 개발 예정이실까요?
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.
네넹 필터링 파트는 아직 api 준비중인 것도 있어서 잠시 미뤄뒀습니다!
✅ 요약
🪄 변경사항
관리자 페이지 디자인이 수정되었습니다.
롤링페이퍼 페이지를 퍼블리싱 해놨습니다.
신고 기능을 구현했습니다.


ReportModal의 props값에 다음과 같은 값을 담아주면 됩니다!
🖼️ 결과 화면 (선택)
💬 리뷰어에게 전할 말 (선택)