diff --git a/app/src/components/Gallery.tsx b/app/src/components/Gallery.tsx
index 2867682..189814b 100644
--- a/app/src/components/Gallery.tsx
+++ b/app/src/components/Gallery.tsx
@@ -11,41 +11,43 @@ export default function Gallery({
imgs?: (string | components["schemas"]["Files"])[] | null;
limit: number;
}) {
- if (imgs) {
- imgs = imgs.slice(0, limit);
-
- var content: any = [];
+ if (imgs == null) {
+ return;
+ }
- var count_5 = 0;
- var count_3 = 0;
- imgs.map((img) => {
- var is_long_5 = Math.random() > 0.5 && count_5 < 4;
- count_5 += is_long_5 ? 2 : 1;
- count_5 %= 5;
+ imgs = imgs.slice(0, limit);
- var is_long_3 = Math.random() > 0.5 && count_3 < 2;
- count_3 += is_long_3 ? 2 : 1;
- count_3 %= 3;
+ var content: any = [];
- content.push(
-