-
Notifications
You must be signed in to change notification settings - Fork 35
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
[손재헌] sprint10 #288
The head ref may contain hidden characters: "Next-\uC190\uC7AC\uD5CC-sprint10"
[손재헌] sprint10 #288
Conversation
boolean이 아닌 number state를 리턴하도록 수정
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.
과제하느라 고생하셨습니다!
export default interface ArticlePost { | ||
image: string; | ||
content: string; | ||
title: 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.
post의 body 타입은 보통 PostArticleBody 같은 이름도 추천드려요
writer: { | ||
id: number; | ||
nickname: string; | ||
image: 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.
writer 타입도 있어도 좋아보입니다.
@@ -0,0 +1,11 @@ | |||
export default interface CommentType { |
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.
타입 정렬해서 작성해주신거 좋네요!
<div className={styles.articleWriter}> | ||
<div className={styles.profileImageContainer}> | ||
<Image fill src="/images/ic_profile.png" alt="프로필" /> | ||
<Link href={`boards/${article.id}`} style={{ textDecoration: "none"}}> |
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.
Link 잘 활용해주셨네요!
@@ -64,4 +64,24 @@ | |||
} | |||
} | |||
} | |||
|
|||
.loginButton { |
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.
css 옵션 관련있는것끼리 깔끔하게 잘 정리해주셨네요!
const [isDropdownOpen, setIsDropdownOpen] = useState(false); | ||
const [isDropdownClicked, setIsDropdownClicked] = useState(false); | ||
const [isDocumentClicked, setIsDocumentClicked] = useState(false); | ||
const [dropdownState, setDropdownState] = useState(0); |
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.
이 상태를 숫자로 관리해주셨는데, 혹시 어떤 의미일까요?
nextCursor: number | null; | ||
} | ||
|
||
export const getServerSideProps: GetServerSideProps = async (context) => { |
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.
getServerSideProps 활용 잘해주셨네요!
let article: ArticleType; | ||
try { | ||
article = await getArticle(id); | ||
} catch { | ||
return { | ||
notFound: true | ||
} | ||
} |
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.
이 로직은 어차피 해당 id에 해당하는 데이터를 불러오지 않는다면 다른 값들이 null일 것이기 때문에 그것들로 예외처리를 해보시는 것도 괜찮을 것 같습니다.
질문은 멘토링 시간에 같이 보면 좋을 것 같습니다. |
요구사항
기본
심화
주요 변경사항
스크린샷
멘토에게