Skip to content
This repository was archived by the owner on Apr 18, 2024. It is now read-only.

Commit 32c3ef4

Browse files
authored
fix: LSDV-4960: Sort annotations by creation date instead of pk (#1342)
fix: lsdv-4960: sort annotations by creation date instead of pk
1 parent 5b1d692 commit 32c3ef4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/AnnotationsCarousel/AnnotationsCarousel.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export const AnnotationsCarousel = observer(({ store, annotationStore }: Annotat
5454
<Block name='annotations-carousel' style={{ '--carousel-left': `${currentPosition}px` }}>
5555
<Elem ref={containerRef} name='container'>
5656
<Elem ref={carouselRef} name='carosel'>
57-
{entities.sort((a, b) => a.pk - b.pk).map(entity => (
57+
{entities.sort((a, b) => new Date(b.createdDate).getTime() - new Date(a.createdDate).getTime()).map(entity => (
5858
<AnnotationButton
5959
key={entity?.id}
6060
entity={entity}

0 commit comments

Comments
 (0)