@applicaster/zapp-react-native-app 13.0.0-alpha.7019824418 → 13.0.0-alpha.7025276181
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.
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
import { useNavigation } from "@applicaster/zapp-react-native-utils/reactHooks/navigation";
|
|
10
10
|
import { useAnalytics } from "@applicaster/zapp-react-native-utils/analyticsUtils";
|
|
11
11
|
import { useRivers } from "@applicaster/zapp-react-native-utils/reactHooks/state";
|
|
12
|
+
import { useErrorStore } from "@applicaster/quick-brick-core/App/ErrorBoundary/store";
|
|
12
13
|
|
|
13
14
|
const getHome = R.compose(R.find(R.propEq("home", true)), R.values);
|
|
14
15
|
|
|
@@ -32,6 +33,11 @@ const InteractionManagerComponent = () => {
|
|
|
32
33
|
|
|
33
34
|
const goToHome = () => {
|
|
34
35
|
const home = getHome(rivers);
|
|
36
|
+
|
|
37
|
+
if (!home) {
|
|
38
|
+
throw new Error("Could not find home screen");
|
|
39
|
+
}
|
|
40
|
+
|
|
35
41
|
navigator.replace(home);
|
|
36
42
|
};
|
|
37
43
|
|
|
@@ -40,7 +46,16 @@ const InteractionManagerComponent = () => {
|
|
|
40
46
|
if (isHomeScreen()) {
|
|
41
47
|
exitToBackground();
|
|
42
48
|
} else {
|
|
43
|
-
|
|
49
|
+
try {
|
|
50
|
+
goToHome();
|
|
51
|
+
} catch (e) {
|
|
52
|
+
const errorMessage = "Can't find home screen";
|
|
53
|
+
const error = new Error(errorMessage);
|
|
54
|
+
|
|
55
|
+
useErrorStore
|
|
56
|
+
.getState()
|
|
57
|
+
.setError(error, "Failed navigating to home screen", false);
|
|
58
|
+
}
|
|
44
59
|
}
|
|
45
60
|
} else {
|
|
46
61
|
sendHardwareBackButtonClickEvent({ navigator });
|
package/package.json
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applicaster/zapp-react-native-app",
|
|
3
|
-
"version": "13.0.0-alpha.
|
|
3
|
+
"version": "13.0.0-alpha.7025276181",
|
|
4
4
|
"description": "Zapp App Component for Applicaster's Quick Brick React Native App",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
7
|
-
"test": "jest -w=2",
|
|
8
7
|
"build": "echo 'skipping ts build for core packages'"
|
|
9
8
|
},
|
|
10
9
|
"repository": {
|
|
@@ -28,11 +27,11 @@
|
|
|
28
27
|
},
|
|
29
28
|
"homepage": "https://github.com/applicaster/quickbrick#readme",
|
|
30
29
|
"dependencies": {
|
|
31
|
-
"@applicaster/quick-brick-core": "13.0.0-alpha.
|
|
32
|
-
"@applicaster/zapp-react-native-bridge": "13.0.0-alpha.
|
|
33
|
-
"@applicaster/zapp-react-native-redux": "13.0.0-alpha.
|
|
34
|
-
"@applicaster/zapp-react-native-ui-components": "13.0.0-alpha.
|
|
35
|
-
"@applicaster/zapp-react-native-utils": "13.0.0-alpha.
|
|
30
|
+
"@applicaster/quick-brick-core": "13.0.0-alpha.7025276181",
|
|
31
|
+
"@applicaster/zapp-react-native-bridge": "13.0.0-alpha.7025276181",
|
|
32
|
+
"@applicaster/zapp-react-native-redux": "13.0.0-alpha.7025276181",
|
|
33
|
+
"@applicaster/zapp-react-native-ui-components": "13.0.0-alpha.7025276181",
|
|
34
|
+
"@applicaster/zapp-react-native-utils": "13.0.0-alpha.7025276181",
|
|
36
35
|
"axios": "^0.28.0",
|
|
37
36
|
"camelize": "^1.0.0",
|
|
38
37
|
"query-string": "7.1.3",
|
|
@@ -48,7 +47,6 @@
|
|
|
48
47
|
"@applicaster/zapp-react-native-tvos-ui-components": "*",
|
|
49
48
|
"@babel/runtime": "*",
|
|
50
49
|
"@react-native-community/netinfo": "*",
|
|
51
|
-
"@types/node": "*",
|
|
52
50
|
"immer": "*",
|
|
53
51
|
"react": "*",
|
|
54
52
|
"react-native": "*",
|