Skip to content

Commit b14b873

Browse files
committed
fix: 마이페이지 좋아요 최신순으로 정렬
1 parent e8fad7b commit b14b873

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/entities/user/ui/BookmarkList.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ const BookmarkList = () => {
88
const { data } = useBookmarks();
99
const navigate = useNavigate();
1010

11-
const sortedData = data ? [...data].sort((a, b) => a.id - b.id) : [];
12-
const visibleEvents = sortedData.slice(0, 2);
11+
if (!data) return null;
12+
const visibleEvents = data.slice(0, 2);
1313

1414
return (
1515
<div className="w-full h-full max-h-84 bg-white border-[0.5px] rounded-[10px] px-5 md:px-7 py-4 md:py-5">

0 commit comments

Comments
 (0)