We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 072dad6 commit c82ac37Copy full SHA for c82ac37
1 file changed
src/pages/photos.astro
@@ -28,9 +28,7 @@ try {
28
.filter((obj: any) => obj.Key?.match(/\.(jpg|jpeg|png|gif|webp)$/i))
29
.filter((obj: any) => !obj.Key?.startsWith("preview_"));
30
31
- const sortedPhotos = filteredPhotos.sort((a: any, b: any) => {
32
- return b.Key!.localeCompare(a.Key!);
33
- });
+ const sortedPhotos = filteredPhotos.sort(() => Math.random() - 0.5);
34
35
photos = sortedPhotos.map((obj: any) => obj.Key!);
36
}
0 commit comments