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

[#667] [북카이브] 유저 로그인 상태의 북카이브 UI 수정 #668

Merged
merged 2 commits into from
Jul 24, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
4 changes: 3 additions & 1 deletion src/app/bookarchive/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ const Contents = () => {
enabled: isAuthenticated,
});

return isAuthenticated ? (
const hasProfile = isAuthenticated && userData?.job?.jobGroupName;

return hasProfile ? (
<BookArchiveForAuth userJobGroup={userData.job.jobGroupName} />
) : (
<BookArchiveForUnAuth />
Expand Down
2 changes: 1 addition & 1 deletion src/components/bookArchive/BookArchiveForAuth.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const BookArchiveForAuth = ({
return (
<div className="flex w-full flex-col gap-[1.5rem] font-body1-bold">
<h2>👀 이런 책들이 많이 꽂혔어요</h2>
<ul className="flex gap-[1.5rem] overflow-auto pb-[1.5rem]">
<ul className="flex w-[calc(100%+2rem)] gap-[1.5rem] overflow-auto pb-[1.5rem]">
{booksData.books.map(({ bookId, imageUrl, title }) => (
<li key={bookId} className="max-w-[9rem]">
<Link href={`/book/${bookId}`} className="flex flex-col gap-[1rem]">
Expand Down
Loading