@primestyleai/tryon 5.8.18 → 5.8.19
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
|
@@ -10751,7 +10751,9 @@ function PrimeStyleTryonInner({
|
|
|
10751
10751
|
const handleUseActiveProfile = useCallback(() => {
|
|
10752
10752
|
const p = profiles.find((x) => x.id === activeProfileId);
|
|
10753
10753
|
if (!p) return;
|
|
10754
|
-
const
|
|
10754
|
+
const profileHeight = p.height ?? p.heightCm ?? 0;
|
|
10755
|
+
const profileWeight = p.weight ?? p.weightKg ?? 0;
|
|
10756
|
+
const hasIdentity = profileHeight > 0 && profileWeight > 0;
|
|
10755
10757
|
if (!hasIdentity) return;
|
|
10756
10758
|
setSizingResult(null);
|
|
10757
10759
|
setSizingLoading(true);
|
|
@@ -11617,7 +11619,10 @@ function PrimeStyleTryonInner({
|
|
|
11617
11619
|
setSizingUnit,
|
|
11618
11620
|
hasActiveProfileWithMeasurements: (() => {
|
|
11619
11621
|
const p = profiles.find((x) => x.id === activeProfileId);
|
|
11620
|
-
|
|
11622
|
+
if (!p) return false;
|
|
11623
|
+
const ph = p.height ?? p.heightCm ?? 0;
|
|
11624
|
+
const pw = p.weight ?? p.weightKg ?? 0;
|
|
11625
|
+
return ph > 0 && pw > 0;
|
|
11621
11626
|
})(),
|
|
11622
11627
|
onUseActiveProfile: handleUseActiveProfile,
|
|
11623
11628
|
activeProfileName: (() => {
|
|
@@ -20175,7 +20175,9 @@ function PrimeStyleTryonInner({
|
|
|
20175
20175
|
const handleUseActiveProfile = reactExports.useCallback(() => {
|
|
20176
20176
|
const p2 = profiles.find((x2) => x2.id === activeProfileId);
|
|
20177
20177
|
if (!p2) return;
|
|
20178
|
-
const
|
|
20178
|
+
const profileHeight = p2.height ?? p2.heightCm ?? 0;
|
|
20179
|
+
const profileWeight = p2.weight ?? p2.weightKg ?? 0;
|
|
20180
|
+
const hasIdentity = profileHeight > 0 && profileWeight > 0;
|
|
20179
20181
|
if (!hasIdentity) return;
|
|
20180
20182
|
setSizingResult(null);
|
|
20181
20183
|
setSizingLoading(true);
|
|
@@ -21041,7 +21043,10 @@ function PrimeStyleTryonInner({
|
|
|
21041
21043
|
setSizingUnit,
|
|
21042
21044
|
hasActiveProfileWithMeasurements: (() => {
|
|
21043
21045
|
const p2 = profiles.find((x2) => x2.id === activeProfileId);
|
|
21044
|
-
|
|
21046
|
+
if (!p2) return false;
|
|
21047
|
+
const ph2 = p2.height ?? p2.heightCm ?? 0;
|
|
21048
|
+
const pw = p2.weight ?? p2.weightKg ?? 0;
|
|
21049
|
+
return ph2 > 0 && pw > 0;
|
|
21045
21050
|
})(),
|
|
21046
21051
|
onUseActiveProfile: handleUseActiveProfile,
|
|
21047
21052
|
activeProfileName: (() => {
|