mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-04 01:18:34 +00:00
Gallery fixes using thumbnail template. (#572)
Co-authored-by: Michael Chung <michaelchung@michaels-mbp-2.home>
This commit is contained in:
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,
|
||||
}));
|
||||
|
||||
Reference in new issue
Block a user