diff --git a/src/app/book/search/page.tsx b/src/app/book/search/page.tsx index e5983ec7..69879e57 100644 --- a/src/app/book/search/page.tsx +++ b/src/app/book/search/page.tsx @@ -14,6 +14,7 @@ import bookAPI from '@/apis/book'; import SSRSafeSuspense from '@/components/common/SSRSafeSuspense'; import useDebounceValue from '@/hooks/useDebounce'; import useQueryParams from '@/hooks/useQueryParams'; +import useIsScrollAtTop from '@/hooks/useIsScrollAtTop'; import { checkAuthentication } from '@/utils/helpers'; import Loading from '@/components/common/Loading'; @@ -46,6 +47,8 @@ const BookSearchPage = () => { const watchedKeyword = watch('searchValue'); const debouncedKeyword = useDebounceValue(watchedKeyword, 1000); + const { isScrollAtTop } = useIsScrollAtTop(); + /* debounce된 keyword값에 따라 queryParameter를 수정하는 useEffect */ useEffect(() => { const queryValue = getQueryParam(KEYWORD); @@ -57,24 +60,29 @@ const BookSearchPage = () => { } }, [debouncedKeyword, getQueryParam, setQueryParams, removeQueryParam]); - /* TopHeader가 사라졌을 때 input의 위치 top: 5.8rem */ - const inputPositionClasses = watchedKeyword && 'sticky top-[5.8rem]'; + /* TopHeader가 사라졌을 때 input의 위치 top: topSafeArea + 6.15rem */ + const inputPositionClasses = + watchedKeyword && 'sticky top-[calc(env(safe-area-inset-top)+6.15rem)]'; + + /* 검색어가 입력되었을 때 각 컨테이너의 애니메이션 class */ + const discoverPageAnimationClasses = `transition duration-500 ${ + watchedKeyword ? '-translate-y-[6.05rem]' : 'translate-y-0' + }`; + const headingOpacityClasses = `${ + watchedKeyword ? 'opacity-0' : 'opacity-100' + }`; return ( <> -
- -
+ +

+ Discover +

+
- + +

BookArchive

+
{/* TODO: 스켈레톤 컴포넌트로 교체 */} diff --git a/src/app/group/page.tsx b/src/app/group/page.tsx index 2df89972..ad90a3ef 100644 --- a/src/app/group/page.tsx +++ b/src/app/group/page.tsx @@ -12,6 +12,7 @@ import { useMyProfileId } from '@/queries/user/useMyProfileQuery'; import useMounted from '@/hooks/useMounted'; import { checkAuthentication } from '@/utils/helpers'; import useToast from '@/components/common/Toast/useToast'; +import useIsScrollAtTop from '@/hooks/useIsScrollAtTop'; import FloatingButton from '@/components/common/FloatingButton'; import Loading from '@/components/common/Loading'; @@ -28,6 +29,7 @@ import CreateGroupBanner from '@/components/bookGroup/banner/CreateGroupBanner'; const GroupPage = () => { const router = useRouter(); const { show: showToast } = useToast(); + const { isScrollAtTop } = useIsScrollAtTop(); const isAuthenticated = checkAuthentication(); @@ -50,7 +52,9 @@ const GroupPage = () => { return ( <> - + +

Group

+
}> diff --git a/src/app/layout.tsx b/src/app/layout.tsx index de4da8ac..c7a2d4a4 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -34,7 +34,9 @@ export const metadata: Metadata = { { rel: 'icon', url: '/favicon.ico' }, ], appleWebApp: { + capable: true, title: '다독다독', + statusBarStyle: 'black-translucent', startupImage: appleSplashScreens, }, }; diff --git a/src/app/login/page.tsx b/src/app/login/page.tsx index 8505f00a..fa91eb47 100644 --- a/src/app/login/page.tsx +++ b/src/app/login/page.tsx @@ -27,7 +27,7 @@ const LoginPage = () => {

-
+
- +
+ +

Profile

+ +
+
), };