@sheet-i18n/react-client 1.5.0-canary.5 → 1.5.0-canary.7
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.js +3 -3
- package/dist/index.mjs +3 -3
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -162,7 +162,6 @@ function IntlProvider({
|
|
|
162
162
|
children
|
|
163
163
|
}) {
|
|
164
164
|
const { locale } = useIntlLocale({ i18nStore, currentLocale });
|
|
165
|
-
console.log("\u2705 locale in IntlProvider", locale);
|
|
166
165
|
const onIntlError = (err) => {
|
|
167
166
|
const typeSafe = i18nStore.typeSafe;
|
|
168
167
|
if (typeSafe) {
|
|
@@ -176,8 +175,9 @@ function IntlProvider({
|
|
|
176
175
|
locale,
|
|
177
176
|
messages: i18nStore == null ? void 0 : i18nStore.localeSet[locale],
|
|
178
177
|
onError: onIntlError,
|
|
179
|
-
children
|
|
180
|
-
}
|
|
178
|
+
children: !isLoading && children
|
|
179
|
+
},
|
|
180
|
+
`sheet-i18n-locale-${locale}`
|
|
181
181
|
);
|
|
182
182
|
}
|
|
183
183
|
function useIntlLocale({
|
package/dist/index.mjs
CHANGED
|
@@ -139,7 +139,6 @@ function IntlProvider({
|
|
|
139
139
|
children
|
|
140
140
|
}) {
|
|
141
141
|
const { locale } = useIntlLocale({ i18nStore, currentLocale });
|
|
142
|
-
console.log("\u2705 locale in IntlProvider", locale);
|
|
143
142
|
const onIntlError = (err) => {
|
|
144
143
|
const typeSafe = i18nStore.typeSafe;
|
|
145
144
|
if (typeSafe) {
|
|
@@ -153,8 +152,9 @@ function IntlProvider({
|
|
|
153
152
|
locale,
|
|
154
153
|
messages: i18nStore == null ? void 0 : i18nStore.localeSet[locale],
|
|
155
154
|
onError: onIntlError,
|
|
156
|
-
children
|
|
157
|
-
}
|
|
155
|
+
children: !isLoading && children
|
|
156
|
+
},
|
|
157
|
+
`sheet-i18n-locale-${locale}`
|
|
158
158
|
);
|
|
159
159
|
}
|
|
160
160
|
function useIntlLocale({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sheet-i18n/react-client",
|
|
3
|
-
"version": "1.5.0-canary.
|
|
3
|
+
"version": "1.5.0-canary.7",
|
|
4
4
|
"description": "a client package for react modules used by sheet-i18n",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -25,16 +25,16 @@
|
|
|
25
25
|
},
|
|
26
26
|
"license": "ISC",
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@sheet-i18n/shared-utils": "1.8.0-canary.
|
|
29
|
-
"@sheet-i18n/errors": "1.8.0-canary.
|
|
30
|
-
"@sheet-i18n/react-core": "1.5.0-canary.
|
|
28
|
+
"@sheet-i18n/shared-utils": "1.8.0-canary.1",
|
|
29
|
+
"@sheet-i18n/errors": "1.8.0-canary.1",
|
|
30
|
+
"@sheet-i18n/react-core": "1.5.0-canary.1"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@types/react": "^19.0.2",
|
|
34
34
|
"@types/react-dom": "^19.0.2",
|
|
35
35
|
"react": "^18.2.0",
|
|
36
36
|
"react-intl": "^7.0.4",
|
|
37
|
-
"@sheet-i18n/typescript-config": "1.8.0-canary.
|
|
37
|
+
"@sheet-i18n/typescript-config": "1.8.0-canary.1"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
40
|
"react": "^18 || ^19 || ^20 || ^21",
|