@tramvai/react 1.95.1 → 1.95.2
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/lib/react.es.js +6 -6
- package/lib/react.js +6 -6
- package/package.json +2 -2
package/lib/react.es.js
CHANGED
|
@@ -12,11 +12,11 @@ const useDiContainer = () => {
|
|
|
12
12
|
const di = useContext(DIContext);
|
|
13
13
|
if (!di) {
|
|
14
14
|
if (process.env.NODE_ENV !== 'production') {
|
|
15
|
-
throw new Error(`DI
|
|
16
|
-
(
|
|
17
|
-
|
|
15
|
+
throw new Error(`DI container not found, make sure that the application uses 'DIContext.Provider' from '@tramvai/react'
|
|
16
|
+
(in a tramvai application this is usually done by '@tramvai/module-render', otherwise 'DIContext.Provider' from '@tramvai/react' must be explicitly defined somewhere)
|
|
17
|
+
If the above is correct, make sure that the '@tramvai/react' module is not duplicated in the application dependencies, because then the di versions would be incompatible`);
|
|
18
18
|
}
|
|
19
|
-
throw new Error('DI
|
|
19
|
+
throw new Error('DI container not found');
|
|
20
20
|
}
|
|
21
21
|
return di;
|
|
22
22
|
};
|
|
@@ -53,14 +53,14 @@ const FallbackError = () => {
|
|
|
53
53
|
fontSize: 30,
|
|
54
54
|
lineHeight: '36px',
|
|
55
55
|
fontWeight: 200,
|
|
56
|
-
} }, { children: "
|
|
56
|
+
} }, { children: "An error occurred :(" }), void 0),
|
|
57
57
|
jsxs("div", Object.assign({ style: {
|
|
58
58
|
textAlign: 'center',
|
|
59
59
|
marginBottom: 17,
|
|
60
60
|
color: '#9299a2',
|
|
61
61
|
fontSize: 20,
|
|
62
62
|
lineHeight: '24px',
|
|
63
|
-
} }, { children: ["
|
|
63
|
+
} }, { children: ["Try", ' ', jsx("a", Object.assign({ href: "", onClick: () => window.location.reload() }, { children: "reloading the page" }), void 0)] }), void 0)] }, void 0));
|
|
64
64
|
};
|
|
65
65
|
FallbackError.displayName = 'FallbackError';
|
|
66
66
|
|
package/lib/react.js
CHANGED
|
@@ -22,11 +22,11 @@ const useDiContainer = () => {
|
|
|
22
22
|
const di = react.useContext(DIContext);
|
|
23
23
|
if (!di) {
|
|
24
24
|
if (process.env.NODE_ENV !== 'production') {
|
|
25
|
-
throw new Error(`DI
|
|
26
|
-
(
|
|
27
|
-
|
|
25
|
+
throw new Error(`DI container not found, make sure that the application uses 'DIContext.Provider' from '@tramvai/react'
|
|
26
|
+
(in a tramvai application this is usually done by '@tramvai/module-render', otherwise 'DIContext.Provider' from '@tramvai/react' must be explicitly defined somewhere)
|
|
27
|
+
If the above is correct, make sure that the '@tramvai/react' module is not duplicated in the application dependencies, because then the di versions would be incompatible`);
|
|
28
28
|
}
|
|
29
|
-
throw new Error('DI
|
|
29
|
+
throw new Error('DI container not found');
|
|
30
30
|
}
|
|
31
31
|
return di;
|
|
32
32
|
};
|
|
@@ -63,14 +63,14 @@ const FallbackError = () => {
|
|
|
63
63
|
fontSize: 30,
|
|
64
64
|
lineHeight: '36px',
|
|
65
65
|
fontWeight: 200,
|
|
66
|
-
} }, { children: "
|
|
66
|
+
} }, { children: "An error occurred :(" }), void 0),
|
|
67
67
|
jsxRuntime.jsxs("div", Object.assign({ style: {
|
|
68
68
|
textAlign: 'center',
|
|
69
69
|
marginBottom: 17,
|
|
70
70
|
color: '#9299a2',
|
|
71
71
|
fontSize: 20,
|
|
72
72
|
lineHeight: '24px',
|
|
73
|
-
} }, { children: ["
|
|
73
|
+
} }, { children: ["Try", ' ', jsxRuntime.jsx("a", Object.assign({ href: "", onClick: () => window.location.reload() }, { children: "reloading the page" }), void 0)] }), void 0)] }, void 0));
|
|
74
74
|
};
|
|
75
75
|
FallbackError.displayName = 'FallbackError';
|
|
76
76
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tramvai/react",
|
|
3
|
-
"version": "1.95.
|
|
3
|
+
"version": "1.95.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/react.js",
|
|
6
6
|
"typings": "lib/react.d.ts",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"@tinkoff/dippy": "0.7.39",
|
|
27
27
|
"@tinkoff/utils": "^2.1.2",
|
|
28
28
|
"@tinkoff/url": "0.7.37",
|
|
29
|
-
"@tramvai/core": "1.95.
|
|
29
|
+
"@tramvai/core": "1.95.2",
|
|
30
30
|
"react": ">=16.8.0",
|
|
31
31
|
"react-dom": ">=16.8.0",
|
|
32
32
|
"tslib": "^2.0.3"
|