Skip to content

Commit f4cc4d8

Browse files
authored
[#667] [북카이브] 유저 로그인 상태의 북카이브 UI 수정 (#668)
* fix: 로그인 유저 북카이브 추천 도서 리스트 우측 너비 수정 * fix: 프로필 정보가 없는 유저가 북카이브 접근 시 BookArchiveForUnAuth 컴포넌트 보여주도록 수정
1 parent 60eaaec commit f4cc4d8

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/app/bookarchive/page.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ const Contents = () => {
2727
enabled: isAuthenticated,
2828
});
2929

30-
return isAuthenticated ? (
30+
const hasProfile = isAuthenticated && userData?.job?.jobGroupName;
31+
32+
return hasProfile ? (
3133
<BookArchiveForAuth userJobGroup={userData.job.jobGroupName} />
3234
) : (
3335
<BookArchiveForUnAuth />

src/components/bookArchive/BookArchiveForAuth.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const BookArchiveForAuth = ({
3737
return (
3838
<div className="flex w-full flex-col gap-[1.5rem] font-body1-bold">
3939
<h2>👀 이런 책들이 많이 꽂혔어요</h2>
40-
<ul className="flex gap-[1.5rem] overflow-auto pb-[1.5rem]">
40+
<ul className="flex w-[calc(100%+2rem)] gap-[1.5rem] overflow-auto pb-[1.5rem]">
4141
{booksData.books.map(({ bookId, imageUrl, title }) => (
4242
<li key={bookId} className="max-w-[9rem]">
4343
<Link href={`/book/${bookId}`} className="flex flex-col gap-[1rem]">

0 commit comments

Comments
 (0)