Gallery fixes using thumbnail template. (#572)

Co-authored-by: Michael Chung <michaelchung@michaels-mbp-2.home>
This commit is contained in:
ArEnScandMichael Chung authored and GitHub committed 2025-05-01 16:45:15 -04:00
1 parent 39092fa866
commit ecb73e4f80
1 file changed
+5 -2
@@ -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,
}));