We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e8fad7b commit b14b873Copy full SHA for b14b873
src/entities/user/ui/BookmarkList.tsx
@@ -8,8 +8,8 @@ const BookmarkList = () => {
8
const { data } = useBookmarks();
9
const navigate = useNavigate();
10
11
- const sortedData = data ? [...data].sort((a, b) => a.id - b.id) : [];
12
- const visibleEvents = sortedData.slice(0, 2);
+ if (!data) return null;
+ const visibleEvents = data.slice(0, 2);
13
14
return (
15
<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