Compare commits

...
Author SHA1 Message Date
Michael Chung 53234dc3da Fix image gallery data mapping 2025-05-01 16:35:25 -04:00
2 changed files with 20 additions and 2 deletions
+14
View File
@@ -0,0 +1,14 @@
#!/usr/bin/env bash
# Get the directory of this script
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# Go up to the root of the repository (assumes src/app/pages is always 3 levels deep)
REPO_ROOT="$(cd "${SCRIPT_DIR}/../../.." && pwd)"
cd "${REPO_ROOT}"
echo "${REPO_ROOT}"
# Run the launch script
./script/desktop/run_desktop_3d.sh
@@ -128,13 +128,17 @@ export const GalleryModal = React.memo(
user_uploads_only: activeTab === "uploads",
});
if (response.success && response.data) {
// Print the JSON response for debugging
console.log("Media files response:", response.data);
const newItems = response.data.map((item: any) => ({
id: item.token,
label: item.maybe_title || "Image Generation",
thumbnail: item.thumbnail,
fullImage: item.fullImage,
thumbnail: item.media_links.maybe_thumbnail_template,
fullImage: item.media_links.cdn_url,
createdAt: item.created_at,
}));
console.log("Media files response:", newItems);
setGroupedItems(groupItemsByDate(newItems));
}
} catch (error) {