@yogiswara/honcho-editor-ui 1.3.3 → 1.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -374,12 +374,19 @@ export function useHonchoEditor(controller, initImageId, firebaseUid) {
|
|
|
374
374
|
}, [initImageId, firebaseUid, controller, isEditorReady, loadImageFromId]);
|
|
375
375
|
useEffect(() => {
|
|
376
376
|
const initialize = async () => {
|
|
377
|
-
// 1. Check if we have the initial data and the editor is ready
|
|
378
377
|
if (initImageId && firebaseUid && controller && isEditorReady) {
|
|
379
378
|
console.log(`[INIT] Starting sequence for image: ${initImageId}`);
|
|
380
|
-
// 2. Load the initial image data and get the gallery object back
|
|
381
379
|
const initialGallery = await loadImageFromId(firebaseUid, initImageId);
|
|
382
|
-
//
|
|
380
|
+
// ✅ ADD THIS BLOCK TO CHECK THE DATA
|
|
381
|
+
console.group("[DEBUG] Checking Initial Gallery Data");
|
|
382
|
+
if (initialGallery) {
|
|
383
|
+
console.log("Full gallery object received:", initialGallery);
|
|
384
|
+
console.log("Discovered eventId from data:", initialGallery.event_id);
|
|
385
|
+
}
|
|
386
|
+
else {
|
|
387
|
+
console.error("Failed to fetch the initial gallery object.");
|
|
388
|
+
}
|
|
389
|
+
console.groupEnd();
|
|
383
390
|
if (initialGallery && initialGallery.event_id) {
|
|
384
391
|
const fetchedEventId = initialGallery.event_id;
|
|
385
392
|
console.log(`[INIT] Discovered eventID: ${fetchedEventId}`);
|