-
Notifications
You must be signed in to change notification settings - Fork 2
Refactor/284/댓글컴포넌트_리팩토링 #286
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: "Refactor/284/\uB313\uAE00_prop\uCD94\uAC00"
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
| import type { FieldErrors } from 'react-hook-form'; | ||
|
|
||
| interface CommentListProps { | ||
| href?: string; |
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.
그냥 링크가 가능한 컴포넌트임을 나타내려는 프롭이면 boolean 타입으로 linkable 등으로 받아도 될 것같구요,
아니면 직접 주소를 전달하는 방식도 괜찮은것 같아요.
지금 저희 서비스에서는 코멘트가 한 게시판에 묶여있는거지만, 여러 게시판이 있는경우고, 코멘트 컴포넌트가 공용으로 쓰인다고 했을때에는 이 부분이 수정되어야할 것 같아서욤
예를 들어서 board/{id}, epigram/{id}, market/{id} 이렇게 여러 게시판에서 코멘트가 쓰인다고 생각하면, 지금의 코멘트 컴포넌트는 epgiram으로만 이동되겠죠?
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.
컴포넌트 내부에서 변조하는 느낌에서, 외부에서 준대로 쓰인다. 라는 느낌으로?
src/components/Comment.tsx
Outdated
| {href ? ( | ||
| <Link href={href + epigramId} className={classes.commentWrapper}> | ||
| <CommentBody /> | ||
| </Link> | ||
| ) : ( | ||
| <div className={classes.commentWrapper}> | ||
| <CommentBody /> | ||
| </div> | ||
| )} |
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.
body부분 묶어내서, 관리하기 편할것같아요 👍
cksrlcks
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.
고생하셨습니다!
❓이슈
📝 Description
Comment 컴포넌트 리팩토링
<Link>, false면<div>로 렌더링되도록 수정🌀 PR Type
어떤 변경 사항이 있나요?
PR