Compare commits

...
Author SHA1 Message Date
Michael Chung 9f5a43ea01 Gallery fixes using thumbnail template. 2025-05-01 16:44:50 -04:00
@@ -130,11 +130,14 @@ export const GalleryModal = React.memo(
if (response.success && response.data) {
// Print the JSON response for debugging
console.log("Media files response:", response.data);
const thumbnail_size = 100;
const newItems = response.data.map((item: any) => ({
id: item.token,
label: item.maybe_title || "Image Generation",
thumbnail: item.media_links.maybe_thumbnail_template,
thumbnail: item.media_links.maybe_thumbnail_template?.replace(
"{WIDTH}",
thumbnail_size.toString()
),
fullImage: item.media_links.cdn_url,
createdAt: item.created_at,
}));