-
Notifications
You must be signed in to change notification settings - Fork 7
[이아영] 7주차 과제 제출 #34
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
base: main
Are you sure you want to change the base?
[이아영] 7주차 과제 제출 #34
Conversation
- 로그인 한 유저만 좋아요 가능 - 중복으로 좋아요 방지 - 좋아요 수 확인 가능
- 사용자 스키마 role 필드 추가 (기본값 normal) - 로그인 페이지에 로그인 방법 선택 - admin 권한 게시글 수정 삭제 모두 가능
pororori
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.
아영님! 이번 과제 구현하시느라 정말 고생 많으셨습니다 좋아요, 댓글, 권한 기반 기능까지 잘 반영하셔서 요구사항을 충실히 만족시킨 점이 돋보였습니다. 코드도 직관적으로 작성되어 이해하기 쉬웠습니다. 위에서 제안드린 개선 포인트를 반영하면 더욱 안정적이고 완성도 높은 게시판이 될 것 같습니다!
| <p className="text-sm text-gray-500">아직 댓글이 없습니다.</p> | ||
| ) : ( | ||
| <ul className="space-y-3"> | ||
| {comments.map((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.
key 값으로 c.id를 사용하는 건 좋지만, 혹시 서버에서 id가 중복되거나 없는 경우를 대비해 index를 함께 활용하거나 id 생성 로직을 보강하면 안정성이 더 높아질 것 같습니다.
| {result.map((post) => ( | ||
| <div className="list-item" key={post._id.toString()}> | ||
| <div className="flex items-center justify-between"> | ||
| <Link href={`/detail/${post._id}`}> |
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.
게시글 내용이 길 경우 리스트 화면에서 너무 많이 노출될 수 있습니다. post.content.slice(0, 100) 같은 방식으로 미리보기 글자 수를 제한하면 가독성이 개선됩니다.
⛏️ 7주차 리드미 바로가기
2025-11-16.3.23.20.mov