@sonic-equipment/ui 0.0.90 → 0.0.91
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.ts +1 -0
- package/dist/index.js +10 -2
- package/dist/src/config.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -71,7 +71,8 @@ const configPerEnvironment = {
|
|
|
71
71
|
ALGOLIA_API_KEY: 'e0edf30798a6b2e4e44fd25f0f2f9646',
|
|
72
72
|
ALGOLIA_APP_ID: 'testing9VXJ0U4GSV',
|
|
73
73
|
ALGOLIA_HOST: 'sonicequipment.commerce.insitesandbox.com',
|
|
74
|
-
BFF_API_URL: 'https://
|
|
74
|
+
BFF_API_URL: 'https://sonicequipment.commerce.insitesandbox.com/api/v1/bff',
|
|
75
|
+
COOKIE_DOMAIN: undefined,
|
|
75
76
|
SHOP_API_URL:
|
|
76
77
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
77
78
|
'',
|
|
@@ -81,6 +82,7 @@ const configPerEnvironment = {
|
|
|
81
82
|
ALGOLIA_APP_ID: '14CUFCVMAD',
|
|
82
83
|
ALGOLIA_HOST: 'shop.sonic-equipment.com',
|
|
83
84
|
BFF_API_URL: 'https://shop.sonic-equipment.com/api/v1/bff',
|
|
85
|
+
COOKIE_DOMAIN: '.sonic-equipment.com',
|
|
84
86
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
85
87
|
SHOP_API_URL: 'https://shop.sonic-equipment.com',
|
|
86
88
|
},
|
|
@@ -89,6 +91,7 @@ const configPerEnvironment = {
|
|
|
89
91
|
ALGOLIA_APP_ID: 'testing9VXJ0U4GSV',
|
|
90
92
|
ALGOLIA_HOST: 'sonicequipment.commerce.insitesandbox.com',
|
|
91
93
|
BFF_API_URL: 'https://sonicequipment.commerce.insitesandbox.com/api/v1/bff',
|
|
94
|
+
COOKIE_DOMAIN: '.insitesandbox.com',
|
|
92
95
|
SHOP_API_URL:
|
|
93
96
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
94
97
|
'https://sonicequipment.commerce.insitesandbox.com',
|
|
@@ -98,6 +101,7 @@ const configPerEnvironment = {
|
|
|
98
101
|
ALGOLIA_APP_ID: 'testing9VXJ0U4GSV',
|
|
99
102
|
ALGOLIA_HOST: 'sonicequipment.commerce.insitesandbox.com',
|
|
100
103
|
BFF_API_URL: 'https://sonicequipment.commerce.insitesandbox.com/api/v1/bff',
|
|
104
|
+
COOKIE_DOMAIN: '.insitesandbox.com',
|
|
101
105
|
SHOP_API_URL:
|
|
102
106
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
103
107
|
'https://sonic.local.com:4443',
|
|
@@ -7780,7 +7784,7 @@ function useUpdateLanguageById() {
|
|
|
7780
7784
|
}
|
|
7781
7785
|
|
|
7782
7786
|
function useCookie(name, options) {
|
|
7783
|
-
const cookieValue = Cookies.get(name
|
|
7787
|
+
const cookieValue = Cookies.get()[name];
|
|
7784
7788
|
const [stateValue, setStateValue] = useState(cookieValue);
|
|
7785
7789
|
function setValue(valueOrFn) {
|
|
7786
7790
|
setStateValue(oldValue => {
|
|
@@ -7814,7 +7818,11 @@ function useSessionStorage(key, initialState) {
|
|
|
7814
7818
|
}
|
|
7815
7819
|
|
|
7816
7820
|
const cookieOptions = {
|
|
7821
|
+
domain: config.COOKIE_DOMAIN,
|
|
7822
|
+
expires: 365,
|
|
7817
7823
|
path: '/',
|
|
7824
|
+
sameSite: 'None',
|
|
7825
|
+
secure: true,
|
|
7818
7826
|
};
|
|
7819
7827
|
function useCountriesLanguages({ defaultCountryCode, defaultLanguageCode, }) {
|
|
7820
7828
|
const [sessionCountries, setSessionCountries] = useSessionStorage('countries-v1');
|
package/dist/src/config.d.ts
CHANGED