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

[#662] [내 프로필] 책장, 참여 중인 모임이 비어있을 때 문구 노출 #663

Merged
merged 3 commits into from
Jul 24, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 4 additions & 10 deletions src/app/profile/me/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,21 +63,15 @@ const MyProfileForUnAuth = () => {
<BookShelf>
<div className="w-app pb-[2.5rem] pt-[2rem] shadow-[0px_20px_20px_-16px_#D1D1D1]">
<BookShelf.Background />
<div className="pb-[5.5rem] pt-[3rem] text-center">
<p className="text-placeholder font-body2-regular">
책장이 비었어요.
</p>
</div>
<BookShelf.EmptyText />
</div>
</BookShelf>
</div>
<div className="flex flex-col gap-[0.6rem]">
<h3 className="font-body1-bold">참여한 모임</h3>
<div className="pb-[5.5rem] pt-[5.5rem] text-center">
<p className="text-placeholder font-body2-regular">
참여 중인 모임이 없어요.
</p>
</div>
<p className="py-[4rem] text-center text-placeholder font-body2-regular">
참여 중인 모임이 없어요.
</p>
</div>
</div>
</>
Expand Down
7 changes: 7 additions & 0 deletions src/components/bookShelf/BookShelf.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,15 @@ const Book = ({
);
};

const EmptyText = () => (
<p className="pb-[5.5rem] pt-[3rem] text-center text-placeholder font-body2-regular">
책장이 비었어요.
</p>
);

BookShelf.Background = Background;
BookShelf.Info = Info;
BookShelf.Books = Books;
BookShelf.EmptyText = EmptyText;

export default BookShelf;
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ const ProfileBookshelfPresenter = ({
<BookShelf>
<div className="w-app pb-[2.5rem] pt-[2rem] shadow-[0px_20px_20px_-16px_#D1D1D1]">
<BookShelf.Background />
<BookShelf.Books books={books} />
{books.length > 0 ? (
<BookShelf.Books books={books} />
) : (
<BookShelf.EmptyText />
)}
</div>
</BookShelf>
</div>
Expand Down
32 changes: 20 additions & 12 deletions src/components/profile/group/ProfileGroupPresenter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,26 @@ const ProfileGroupPresenter = ({
<IconArrowRight height="1.3rem" width="1.3rem" />
</Link>

<ul className="relative left-0 flex w-[calc(100%+2rem)] gap-[1rem] overflow-y-hidden overflow-x-scroll pb-[1.5rem] pr-[2rem]">
{bookGroups.map(({ bookGroupId, title, owner, book: { imageUrl } }) => (
<li key={bookGroupId}>
<SimpleBookGroupCard
title={title}
imageSource={imageUrl}
isOwner={!!isGroupOwner && isGroupOwner(owner.id)}
bookGroupId={bookGroupId}
/>
</li>
))}
</ul>
{bookGroups.length > 0 ? (
<ul className="relative left-0 flex w-[calc(100%+2rem)] gap-[1rem] overflow-y-hidden overflow-x-scroll pb-[1.5rem] pr-[2rem]">
{bookGroups.map(
({ bookGroupId, title, owner, book: { imageUrl } }) => (
<li key={bookGroupId}>
<SimpleBookGroupCard
title={title}
imageSource={imageUrl}
isOwner={!!isGroupOwner && isGroupOwner(owner.id)}
bookGroupId={bookGroupId}
/>
</li>
)
)}
</ul>
) : (
<p className="py-[4rem] text-center text-placeholder font-body2-regular">
참여 중인 모임이 없어요.
</p>
)}
</div>
);
};
Expand Down
39 changes: 21 additions & 18 deletions src/components/profile/info/ProfileInfoPresenter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,27 @@ const ProfileInfoPresenter = ({
}: ProfileInfoProps) => {
return (
<div className="mb-[2rem] flex flex-col gap-[2rem]">
<div className="flex gap-[0.8rem]">
<Badge
colorScheme="main"
isFilled={false}
size="large"
fontWeight="bold"
>
{jobGroupKoreanName}
</Badge>
<Badge
colorScheme="main"
isFilled={false}
size="large"
fontWeight="bold"
>
{jobNameKoreanName}
</Badge>
</div>
{jobGroupKoreanName && jobNameKoreanName && (
<div className="flex gap-[0.8rem]">
<Badge
colorScheme="main"
isFilled={false}
size="large"
fontWeight="bold"
>
{jobGroupKoreanName}
</Badge>
<Badge
colorScheme="main"
isFilled={false}
size="large"
fontWeight="bold"
>
{jobNameKoreanName}
</Badge>
</div>
)}

<div className="flex items-center gap-[1rem]">
<Avatar src={profileImage} size="large" />
<h2 className="font-subheading-regular">
Expand Down
Loading