-
Notifications
You must be signed in to change notification settings - Fork 7
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
[SP2] 블로그 탭 게시물 목록 구현 #232
Conversation
@@ -0,0 +1,20 @@ | |||
import type { BlogPostListType } from '@src/lib/types/blog'; | |||
import BlogPost from '@src/views/BlogPage/components/BlogPost'; |
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.
요기 index.ts도 있고 index.tsx도 있어서 default export가 없다는 CI 에러가 발생하고 있어요..!!
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.
BlogPost 폴더 속 컴포넌트들은 BlogPost/index.tsx 에서만 쓰이는 거라면 default export가 없어도 괜찮지 않을까요..?!
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.
1 > 넵 지금 밖이라서 집 가서 고치도록 하겠습니다..!
2 > import문이 여러줄 되는 게 싫어서 index를 만들었는데 없애는 게 더 좋을까요..?
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.
그런 이유에서 index.ts
를 만들었군요!
일단 CI에서 에러가 뜨고 있으니 BlogPost/index.tsx에서는 컴포넌트를 각 import하는 것으로 바꿔야할 것 같아요..!
여러줄 import가 싫다면 파일명을 다르게 하는 방법은 안될까요? 그리고 이 파일명도 컨벤션으로 정하고요!
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.
index.ts는 제거하고 각각 import하는 걸로 바꿨습니다!
사실 지금은 import문이 두 줄이어서 해당 파일이 필수라고 느껴지지는 않아요. 그래서 일단은 각각 import하는 방식으로 가고 나중에 import문이 너무 많아지거나 다른 분들도 필요성을 느낄 때 다시 한 번 논의해봐도 좋을 것 같습니다!
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.
네 좋아요~!!
blogPost: BlogPostType; | ||
} | ||
|
||
function BlogPost({ selectedTap, blogPost }: BlogPostProps) { |
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.
suggestion;
저희 컨벤션에 export default function~
으로 작업하기로 되어있습니다!
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.
앗 꼼꼼하게 봐주셔서 감사합니다!!
@@ -0,0 +1,20 @@ | |||
import type { BlogPostListType } from '@src/lib/types/blog'; | |||
import BlogPost from '@src/views/BlogPage/components/BlogPost'; |
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.
그런 이유에서 index.ts
를 만들었군요!
일단 CI에서 에러가 뜨고 있으니 BlogPost/index.tsx에서는 컴포넌트를 각 import하는 것으로 바꿔야할 것 같아요..!
여러줄 import가 싫다면 파일명을 다르게 하는 방법은 안될까요? 그리고 이 파일명도 컨벤션으로 정하고요!
Summary
Screenshot
Comment