@firedesktop/react-base 1.15.9 → 1.16.1
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/.eslintrc +19 -0
- package/dist/components/AppIcon.d.ts +1 -1
- package/dist/components/AppIcon.js +46 -46
- package/dist/components/Spin.js.map +1 -1
- package/dist/utils/configuration/ConfigurationLoader.js +3 -3
- package/dist/utils/configuration/ConfigurationManager.js +3 -3
- package/dist/utils/fetch/Types.d.ts +1 -0
- package/dist/utils/fetch/fetchWrapper.d.ts +8 -7
- package/dist/utils/fetch/fetchWrapper.js +31 -17
- package/dist/utils/fetch/fetchWrapper.js.map +1 -1
- package/dist/utils/fetch/index.js.map +1 -1
- package/dist/utils/labels/LanguageLoader.js +3 -3
- package/dist/utils/labels/LanguageManager.js +4 -4
- package/package.json +16 -16
- package/src/App.tsx +50 -13
- package/src/TestLabelFunction.tsx +1 -1
- package/src/lib/components/AppIcon.tsx +88 -88
- package/src/lib/components/Spin.tsx +1 -1
- package/src/lib/utils/configuration/ConfigurationLoader.tsx +3 -3
- package/src/lib/utils/configuration/ConfigurationManager.ts +3 -3
- package/src/lib/utils/fetch/Types.ts +1 -0
- package/src/lib/utils/fetch/fetchWrapper.ts +32 -19
- package/src/lib/utils/fetch/index.ts +1 -1
- package/src/lib/utils/labels/LanguageLoader.tsx +3 -3
- package/src/lib/utils/labels/LanguageManager.ts +4 -4
- package/src/reportWebVitals.ts +1 -1
|
@@ -2,11 +2,11 @@ function LanguageManager() {
|
|
|
2
2
|
|
|
3
3
|
async function loadLabels(fullPath: string) {
|
|
4
4
|
try {
|
|
5
|
-
const res = await fetch(fullPath, { headers: {
|
|
5
|
+
const res = await fetch(fullPath, { headers: { 'Content-Type': 'application/json; charset=utf-8' } });
|
|
6
6
|
return await res.json();
|
|
7
7
|
}
|
|
8
8
|
catch (err) {
|
|
9
|
-
console.log(
|
|
9
|
+
console.log('Problem loading the Site Labels');
|
|
10
10
|
}
|
|
11
11
|
};
|
|
12
12
|
|
|
@@ -16,9 +16,9 @@ function LanguageManager() {
|
|
|
16
16
|
console.log(`Loading Labels for this Language ${language}, from this path: ${fullPath}`);
|
|
17
17
|
loadLabels(fullPath).then((response: any) => {
|
|
18
18
|
console.log(`Loaded Labels for this Language ${language}`, response);
|
|
19
|
-
dispatch(updateAppState(
|
|
19
|
+
dispatch(updateAppState('labels', response));
|
|
20
20
|
}).catch((err: any) => {
|
|
21
|
-
console.log(
|
|
21
|
+
console.log('Problem loading the Site Labels');
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
24
|
}
|