Skip to content
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

콘텐츠, 크리에이터 목록이 비어있는 경우 처리 #305

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

guno517
Copy link
Collaborator

@guno517 guno517 commented Apr 22, 2023

💡 이슈 번호

close #302

📖 작업 내용

  • 콘텐츠가 비어있는 경우
  • 크리에이터가 비어있는 경우

✅ PR 포인트

  • 노션에는 비어있을 때 이미지 추가해달라고 했는데 생각나는 이미지가 없어 텍스트로 처리했습니다😅

📸 스크린샷

  • 콘텐츠
    image
  • 크리에이터
    image

@guno517 guno517 added the ☀ Feature 기능 추가, 삭제, 변경 - 코드 수정 발생 시 label Apr 22, 2023
@guno517 guno517 self-assigned this Apr 22, 2023
@guno517 guno517 linked an issue Apr 22, 2023 that may be closed by this pull request
3 tasks
Copy link
Collaborator

@rjsduf0503 rjsduf0503 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@@ -8,7 +8,20 @@ const CardList = ({
type: 'creator' | 'content';
children: ReactNode;
}) => {
return <div className={style.listContainer({ type: type })}>{children}</div>;
const hasContents = Children.toArray(children).length !== 1 ? true : false;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이 부분

const hasContents = Children.toArray(children).length !== 1;

이렇게 변경하면 더 깔끔할 것 같아요~~

return (
<>
{hasContents ? (
<div className={style.listContainer({ type: type })}>{children}</div>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

key value 같으니 type만 적어도 무방할 것 같습니다~~ ㅎㅎ

Comment on lines +19 to +20
? `콘텐츠가 존재하지 않습니다.`
: `크리에이터가 존재하지 않습니다`}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

통일성을 위해 변수를 사용하지 않으니 백틱(`)이 아닌 작은 따옴표(')로 변경하면 깔끔할 것 같아요~~

Copy link
Collaborator

@dmswl98 dmswl98 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍👍👍

Comment on lines +62 to +64
if (!getContents) {
return <Spinner size="huge" />;
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

스피너 굿굿 나중에 에러 바운더리랑 서스펜스도 도입하면 좋을듯~~!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
☀ Feature 기능 추가, 삭제, 변경 - 코드 수정 발생 시
Projects
None yet
Development

Successfully merging this pull request may close these issues.

콘텐츠가 비어 있는 경우 처리
3 participants