From 77fd3fdaa708d3c9c79f6fdd48b438bbb3f23a4b Mon Sep 17 00:00:00 2001 From: keemsebeen Date: Wed, 27 Nov 2024 00:53:47 +0900 Subject: [PATCH] refactor : replace with Profile component --- .../features/BookmarkList/BookmarkList.tsx | 54 ++++-------------- .../BookmarkSelectionList.tsx | 56 +++++-------------- 2 files changed, 24 insertions(+), 86 deletions(-) diff --git a/src/components/features/BookmarkList/BookmarkList.tsx b/src/components/features/BookmarkList/BookmarkList.tsx index 0587101..4982028 100644 --- a/src/components/features/BookmarkList/BookmarkList.tsx +++ b/src/components/features/BookmarkList/BookmarkList.tsx @@ -1,13 +1,12 @@ import { useCallback, useEffect, useRef, useState } from 'react'; import { Button } from '@/components/common/Button'; -import { Icon } from '@/components/common/Icon'; import { IconButton } from '@/components/common/IconButton'; import { Input } from '@/components/common/Input'; import { ListCard } from '@/components/common/ListCard'; import { Modal } from '@/components/common/Modal'; -import { Body1, Body2, Body3 } from '@/components/common/Typography'; -import { findyIconNames } from '@/constants/findyIcons'; +import { Profile } from '@/components/common/Profile'; +import { Body1, Body2 } from '@/components/common/Typography'; import { useBookMarkList } from '@/hooks/api/bookmarks/useBookMarkList'; import { useDeleteBookmark } from '@/hooks/api/bookmarks/useDeleteBookmark'; import { useNewBookMark } from '@/hooks/api/bookmarks/useNewBookMark'; @@ -111,44 +110,13 @@ export const BookmarkList = ({ onNext }: Props) => { {data?.pages .flatMap((page) => page.data) .map((item, index) => ( -
-
handleBookmarkClick(item.bookmarkId)} - className="flex flex-row justify-between items-center cursor-pointer" - > -
- {item.youtuberProfile ? ( - {`${item.name}의 - ) : ( - - )} -
- {item.name} -
- - {item.markersCount} -
-
-
- {isEditing && ( - - )} -
- {index < data.pages.flatMap((page) => page.data).length - 1 && ( -
- )} -
+ page.data).length - 1} + /> ))}
@@ -182,9 +150,9 @@ export const BookmarkList = ({ onNext }: Props) => {
- + 장소 추가 - + { }, [handleObserver]); return ( -
- 북마크 리스트 +
+ + 북마크 리스트 + {data?.pages .flatMap((page) => page.data) .map((item, index) => ( -
-
handleToggleSelect(item.bookmarkId)} - > -
- {item.youtuberProfile ? ( - {`${item.name}의 - ) : ( - - )} -
- {item.name} -
- - {item.markersCount} -
-
-
- {item.bookmarkType !== 'YOUTUBE' && ( - - )} -
- {index < data.pages.flatMap((page) => page.data).length - 1 && ( -
- )} -
+ page.data).length - 1} + /> ))}