@primestyleai/tryon 5.7.4 → 5.7.5
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.
package/dist/react/index.js
CHANGED
|
@@ -10795,9 +10795,18 @@ function PrimeStyleTryonInner({
|
|
|
10795
10795
|
submitSizing("quick");
|
|
10796
10796
|
}, [apiUrl, dynamicFields, sizeGuide, submitSizing, sizingUnit, weightUnit]);
|
|
10797
10797
|
const handleSnapSubmit = useCallback(async (data) => {
|
|
10798
|
-
|
|
10798
|
+
console.log("[ps-sdk] handleSnapSubmit fired", {
|
|
10799
|
+
hasApiRef: !!apiRef.current,
|
|
10800
|
+
hasSseRef: !!sseRef.current,
|
|
10801
|
+
apiUrl
|
|
10802
|
+
});
|
|
10803
|
+
if (!apiRef.current || !sseRef.current) {
|
|
10804
|
+
console.warn("[ps-sdk] handleSnapSubmit BAILED — apiRef or sseRef is null. Check api init.");
|
|
10805
|
+
return;
|
|
10806
|
+
}
|
|
10799
10807
|
const baseUrl = getApiUrl(apiUrl);
|
|
10800
10808
|
const key = getApiKey();
|
|
10809
|
+
console.log("[ps-sdk] handleSnapSubmit calling backend", { baseUrl });
|
|
10801
10810
|
setSelectedFile(data.photoFile);
|
|
10802
10811
|
selectedFileRef.current = data.photoFile;
|
|
10803
10812
|
const objUrl = URL.createObjectURL(data.photoFile);
|
|
@@ -20220,9 +20220,18 @@ function PrimeStyleTryonInner({
|
|
|
20220
20220
|
submitSizing("quick");
|
|
20221
20221
|
}, [apiUrl, dynamicFields, sizeGuide, submitSizing, sizingUnit, weightUnit]);
|
|
20222
20222
|
const handleSnapSubmit = reactExports.useCallback(async (data) => {
|
|
20223
|
-
|
|
20223
|
+
console.log("[ps-sdk] handleSnapSubmit fired", {
|
|
20224
|
+
hasApiRef: !!apiRef.current,
|
|
20225
|
+
hasSseRef: !!sseRef.current,
|
|
20226
|
+
apiUrl
|
|
20227
|
+
});
|
|
20228
|
+
if (!apiRef.current || !sseRef.current) {
|
|
20229
|
+
console.warn("[ps-sdk] handleSnapSubmit BAILED — apiRef or sseRef is null. Check api init.");
|
|
20230
|
+
return;
|
|
20231
|
+
}
|
|
20224
20232
|
const baseUrl = getApiUrl(apiUrl);
|
|
20225
20233
|
const key = getApiKey();
|
|
20234
|
+
console.log("[ps-sdk] handleSnapSubmit calling backend", { baseUrl });
|
|
20226
20235
|
setSelectedFile(data.photoFile);
|
|
20227
20236
|
selectedFileRef.current = data.photoFile;
|
|
20228
20237
|
const objUrl = URL.createObjectURL(data.photoFile);
|