From c1a32e0a68849f8eafd0e70cf4aa469b195645b9 Mon Sep 17 00:00:00 2001 From: Nahyun Date: Tue, 17 Dec 2024 23:03:40 +0900 Subject: [PATCH] =?UTF-8?q?Fix:=20=EB=B6=88=ED=95=84=EC=9A=94=ED=95=9C=20L?= =?UTF-8?q?ink=20=ED=83=9C=EA=B7=B8=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/(home)/_components/FeedLists.css.ts | 5 +++++ src/app/(home)/_components/FeedLists.tsx | 18 ++++++++++-------- .../(home)/_components/RecommendedUsers.tsx | 3 --- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/src/app/(home)/_components/FeedLists.css.ts b/src/app/(home)/_components/FeedLists.css.ts index 4f2a12c7..acbec078 100644 --- a/src/app/(home)/_components/FeedLists.css.ts +++ b/src/app/(home)/_components/FeedLists.css.ts @@ -3,6 +3,10 @@ import { vars } from '@/styles/__theme.css'; export const listBackground = createVar(); +export const listItemWrapper = style({ + cursor: 'pointer', +}); + export const wrapperOuter = style({ padding: '0 16px 84px 16px', marginTop: '12px', @@ -112,6 +116,7 @@ export const profileImageWrapper = style({ height: '30px', position: 'relative', + cursor: 'pointer', }); export const ownerProfileImage = style({ diff --git a/src/app/(home)/_components/FeedLists.tsx b/src/app/(home)/_components/FeedLists.tsx index a3a5ac9b..d07c800e 100644 --- a/src/app/(home)/_components/FeedLists.tsx +++ b/src/app/(home)/_components/FeedLists.tsx @@ -5,6 +5,7 @@ import Link from 'next/link'; import { useInfiniteQuery } from '@tanstack/react-query'; import { useMemo } from 'react'; import { assignInlineVars } from '@vanilla-extract/dynamic'; +import { useRouter } from 'next/navigation'; import SimpleList from '@/components/SimpleList/SimpleList'; import getRecentLists from '@/app/_api/home/getRecentLists'; @@ -20,6 +21,7 @@ import NoDataButton from '@/components/NoData/NoDataButton'; import { commonLocale } from '@/components/locale'; import { useLanguage } from '@/store/useLanguage'; import { useTab } from '@/store/useTab'; +import useMoveToPage from '@/hooks/useMoveToPage'; interface FeedListsType { category?: string; @@ -29,6 +31,7 @@ interface FeedListsType { function FeedLists({ category, tab = 'recent' }: FeedListsType) { const current_QueryKey = tab === 'recent' ? [QUERY_KEYS.getRecentLists, category] : [QUERY_KEYS.getFollowingLists]; const { setCurrentTab } = useTab(); + const { onClickMoveToPage } = useMoveToPage(); //리스트 무한스크롤 리액트 쿼리 함수 const { @@ -82,11 +85,9 @@ function FeedLists({ category, tab = 'recent' }: FeedListsType) { {feedLists && feedLists?.length !== 0 ? ( feedLists?.map((item, index) => { return ( - -
  • - -
  • - +
  • + +
  • ); }) ) : ( @@ -116,6 +117,7 @@ interface FeedListItemType { function FeedListItem({ item, index }: FeedListItemType) { const { language } = useLanguage(); + const { onClickMoveToPage } = useMoveToPage(); const COLOR_INDEX = (num: number) => num % 5; @@ -125,8 +127,8 @@ function FeedListItem({ item, index }: FeedListItemType) { style={assignInlineVars({ [styles.listBackground]: exploreBackgroundColors[COLOR_INDEX(index)] })} >
    -
    - +
    +
    {item?.ownerProfileImage ? ( )} - +
    {item.ownerNickname}
    {`업데이트 ${item.updateCount}회째`}
    diff --git a/src/app/(home)/_components/RecommendedUsers.tsx b/src/app/(home)/_components/RecommendedUsers.tsx index 6b1deb4a..78b64f41 100644 --- a/src/app/(home)/_components/RecommendedUsers.tsx +++ b/src/app/(home)/_components/RecommendedUsers.tsx @@ -15,11 +15,8 @@ import * as styles from './RecommendedUsers.css'; import { UserListsSkeleton } from './Skeleton'; import { commonLocale } from '@/components/locale'; import { useLanguage } from '@/store/useLanguage'; -import useBooleanOutput from '@/hooks/useBooleanOutput'; function UsersRecommendation() { - const { language } = useLanguage(); - const { isOn, handleSetOn, handleSetOff } = useBooleanOutput(); //zustand로 관리하는 user정보 불러오기 const { user: userMe } = useUser(); const myId = userMe.id;