fix: sửa lỗi hiển thị trên browser của điện thoại
This commit is contained in:
@@ -94,6 +94,14 @@ export const ExploreMap = ({ onBack, onLogout, user, onViewTour, onOpenMyPhotos,
|
||||
groups[key].push(photo);
|
||||
}
|
||||
});
|
||||
// Sort each group by likes descending
|
||||
Object.values(groups).forEach((group) => {
|
||||
group.sort((a, b) => {
|
||||
const likesA = a.metadata?.likedUserIds?.length || 0;
|
||||
const likesB = b.metadata?.likedUserIds?.length || 0;
|
||||
return likesB - likesA;
|
||||
});
|
||||
});
|
||||
return Object.values(groups);
|
||||
}, [publicPhotos]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user