feat(ui): sort images by updated_at instead of created_at

fixes issue where saved staging area images are sorted as expected in gallery.
This commit is contained in:
psychedelicious 2023-06-06 12:33:00 +10:00
parent 40d6e4f287
commit 840c632c0a

View File

@ -12,7 +12,7 @@ import { receivedPageOfImages } from 'services/thunks/image';
export const imagesAdapter = createEntityAdapter<ImageDTO>({
selectId: (image) => image.image_name,
sortComparer: (a, b) => dateComparator(b.created_at, a.created_at),
sortComparer: (a, b) => dateComparator(b.updated_at, a.updated_at),
});
export const IMAGE_CATEGORIES: ImageCategory[] = ['general'];