-
Notifications
You must be signed in to change notification settings - Fork 0
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
[feat] 어드민 기대평 페이지 구현 #104
Conversation
setCheckedComments, | ||
}) { | ||
const num = checkedComments.size; | ||
const mutation = useMutation(eventId, () => |
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.
eventId 자체는 다른 useQuery 또는 useMutation에서 중복될 수 있는 값이므로, 고유한 자원을 위해 "admin-comment-(eventId)" 같은 걸로 바꾸면 좋을 겁니다.
const deleteConfirmModal = ( | ||
<ConfirmModal | ||
title="삭제" | ||
description={ | ||
<> | ||
<span>이 동작은 다시 돌이킬 수 없습니다.</span> | ||
<br /> | ||
<span>{num}개의 이벤트를 삭제하시겠습니까?</span> | ||
</> | ||
} | ||
onConfirm={mutation} | ||
/> | ||
); |
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.
공통 컴포넌트를 사용하시는 거 좋습니다.
str += String.fromCharCode(randomCode); | ||
} | ||
|
||
return str; |
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.
향후 다른 곳에서 쓸 수 있겠군요
function getDate(createdAt) { | ||
const yy = createdAt.slice(2, 4); | ||
const mm = createdAt.slice(5, 7); | ||
const dd = createdAt.slice(8, 10); | ||
return `${yy}-${mm}-${dd}`; | ||
} | ||
|
||
function getTime(createdAt) { | ||
const hh = createdAt.slice(11, 13); | ||
const mm = createdAt.slice(14, 16); | ||
const ss = createdAt.slice(17, 19); | ||
return `${hh}:${mm}:${ss}`; | ||
} |
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.
이 부분은 순수 함수기 때문에 컴포넌트 바깥쪽으로 빼는 게 좋습니다.
#️⃣ 연관 이슈
📝 작업 내용