@applicaster/zapp-react-native-utils 13.0.0-rc.118 → 13.0.0-rc.119

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applicaster/zapp-react-native-utils",
3
- "version": "13.0.0-rc.118",
3
+ "version": "13.0.0-rc.119",
4
4
  "description": "Applicaster Zapp React Native utilities package",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -27,7 +27,7 @@
27
27
  },
28
28
  "homepage": "https://github.com/applicaster/quickbrick#readme",
29
29
  "dependencies": {
30
- "@applicaster/applicaster-types": "13.0.0-rc.118",
30
+ "@applicaster/applicaster-types": "13.0.0-rc.119",
31
31
  "buffer": "^5.2.1",
32
32
  "camelize": "^1.0.0",
33
33
  "dayjs": "^1.11.10",
@@ -1,12 +1,24 @@
1
1
  import { useGetNavBarTopBorderWidth } from "./useGetNavBarTopBorderWidth";
2
2
  import { useGetTabBarHeight } from "./useGetTabBarHeight";
3
- import { MenuTypes, useNavigationType } from "./useNavigationType";
3
+ import { useNavigation } from "./useNavigation";
4
+ import { MenuTypes } from "./useNavigationType";
4
5
 
5
6
  export const useGetBottomTabBarHeight = (): number => {
7
+ const { activeRiver } = useNavigation();
8
+
9
+ const navigations = activeRiver?.targetScreen
10
+ ? (activeRiver.targetScreen as ZappRiver).navigations
11
+ : (activeRiver as ZappRiver).navigations;
12
+
13
+ const navigationMenu = navigations?.find(
14
+ ({ category }) => category === "menu"
15
+ );
16
+
6
17
  const topBorderWidth = useGetNavBarTopBorderWidth();
7
18
  const tabBarHeight = useGetTabBarHeight();
8
19
 
9
- const isBottomBarNavigation = useNavigationType() === MenuTypes.bottomTabBar;
20
+ const isBottomBarNavigation =
21
+ navigationMenu.navigation_type === MenuTypes.bottomTabBar;
10
22
 
11
23
  return !isBottomBarNavigation ? 0 : tabBarHeight + topBorderWidth;
12
24
  };