From 2beb0f2eed25dd7076288d75765be890e0eca2fb Mon Sep 17 00:00:00 2001 From: kyuran kim <57716832+gxxrxn@users.noreply.github.com> Date: Wed, 22 May 2024 15:57:39 +0900 Subject: [PATCH] =?UTF-8?q?[#591]=203D=20=EC=B1=85=20=EC=BB=B4=ED=8F=AC?= =?UTF-8?q?=EB=84=8C=ED=8A=B8,=20=EC=B1=85=EC=9E=A5=20=ED=8E=98=EC=9D=B4?= =?UTF-8?q?=EC=A7=80=20=EA=B0=9C=EC=84=A0=20(#594)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: 3d 책 컴포넌트 placeholder 적용 - global css에 bg-blur 클래스 추가 * feat: 책장 상세정보 query suspense 적용 - 책장페이지 ssr 되도록 컴포넌트 분리 * style: 책장 padding 수정 * style: BookShelf.Book 컴포넌트 패딩 1 -> 1.5rem으로 수정 * chore: 불필요한 prop, 태그 제거 --- src/app/bookshelf/[bookshelfId]/page.tsx | 165 ++++++++++-------- .../bookshelf/useBookShelfInfoQuery.ts | 23 ++- src/styles/global.css | 5 + src/v1/bookShelf/BookShelf.tsx | 58 +++--- src/v1/bookShelf/BookShelfCard.tsx | 2 +- src/v1/bookShelf/BookShelfRow.tsx | 2 +- 6 files changed, 156 insertions(+), 99 deletions(-) diff --git a/src/app/bookshelf/[bookshelfId]/page.tsx b/src/app/bookshelf/[bookshelfId]/page.tsx index 0d4c693f8..fbd85b001 100644 --- a/src/app/bookshelf/[bookshelfId]/page.tsx +++ b/src/app/bookshelf/[bookshelfId]/page.tsx @@ -1,23 +1,26 @@ 'use client'; import { useEffect } from 'react'; -import { useInView } from 'react-intersection-observer'; import Link from 'next/link'; +import { useInView } from 'react-intersection-observer'; + +import type { APIBookshelf } from '@/types/bookshelf'; + import useBookShelfBooksQuery from '@/queries/bookshelf/useBookShelfBookListQuery'; import useBookShelfInfoQuery from '@/queries/bookshelf/useBookShelfInfoQuery'; import useMutateBookshelfLikeQuery from '@/queries/bookshelf/useMutateBookshelfLikeQuery'; -import useToast from '@/v1/base/Toast/useToast'; +import { useMyProfileId } from '@/queries/user/useMyProfileQuery'; import { checkAuthentication } from '@/utils/helpers'; import { IconKakao } from '@public/icons'; +import { KAKAO_LOGIN_URL } from '@/constants/url'; + +import useToast from '@/v1/base/Toast/useToast'; import TopNavigation from '@/v1/base/TopNavigation'; import BookShelfRow from '@/v1/bookShelf/BookShelfRow'; import Button from '@/v1/base/Button'; import LikeButton from '@/v1/base/LikeButton'; import BackButton from '@/v1/base/BackButton'; import ShareButton from '@/v1/base/ShareButton'; -import type { APIBookshelf, APIBookshelfInfo } from '@/types/bookshelf'; - -const KAKAO_OAUTH_LOGIN_URL = `${process.env.NEXT_PUBLIC_API_URL}/oauth2/authorize/kakao?redirect_uri=${process.env.NEXT_PUBLIC_CLIENT_REDIRECT_URI}`; export default function UserBookShelfPage({ params: { bookshelfId }, @@ -26,13 +29,34 @@ export default function UserBookShelfPage({ bookshelfId: APIBookshelf['bookshelfId']; }; }) { + return ( +
- 지금 로그인하면
-
- 책장에 담긴 모든 책을 볼 수 있어요!
-
- {userNickname}님의 책장에서
- 다양한
-
- 인사이트를 얻을 수 있어요.
-
+ 지금 로그인하면
+
+ 책장에 담긴 모든 책을 볼 수 있어요!
+
+ {userNickname}님의 책장에서
+ 다양한
+
+ 인사이트를 얻을 수 있어요.
+