@unifold/core 0.1.50 → 0.1.52
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/index.d.mts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +3 -1
- package/dist/index.mjs +3 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -803,11 +803,13 @@ function useUserIp() {
|
|
|
803
803
|
queryKey: ["unifold", "userIpInfo"],
|
|
804
804
|
queryFn: async () => {
|
|
805
805
|
const data = await getIpAddress();
|
|
806
|
+
const subdivision = (data.subdivision_code || data.state || "").toLowerCase() || null;
|
|
806
807
|
return {
|
|
807
808
|
alpha2: data.alpha2.toLowerCase(),
|
|
808
809
|
alpha3: data.alpha3?.toLowerCase(),
|
|
809
810
|
country: data.country,
|
|
810
|
-
state:
|
|
811
|
+
state: subdivision,
|
|
812
|
+
subdivisionCode: subdivision,
|
|
811
813
|
ipAddress: data.ip_address
|
|
812
814
|
};
|
|
813
815
|
},
|
package/dist/index.mjs
CHANGED
|
@@ -735,11 +735,13 @@ function useUserIp() {
|
|
|
735
735
|
queryKey: ["unifold", "userIpInfo"],
|
|
736
736
|
queryFn: async () => {
|
|
737
737
|
const data = await getIpAddress();
|
|
738
|
+
const subdivision = (data.subdivision_code || data.state || "").toLowerCase() || null;
|
|
738
739
|
return {
|
|
739
740
|
alpha2: data.alpha2.toLowerCase(),
|
|
740
741
|
alpha3: data.alpha3?.toLowerCase(),
|
|
741
742
|
country: data.country,
|
|
742
|
-
state:
|
|
743
|
+
state: subdivision,
|
|
744
|
+
subdivisionCode: subdivision,
|
|
743
745
|
ipAddress: data.ip_address
|
|
744
746
|
};
|
|
745
747
|
},
|