@applicaster/zapp-react-native-ui-components 12.0.0-alpha.5812543239 → 12.0.0-alpha.6236157458

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.
@@ -1,4 +1,4 @@
1
- import React from "react";
1
+ import * as React from "react";
2
2
  import { Dimensions } from "react-native";
3
3
  import { useIsTabletLandscape } from "@applicaster/zapp-react-native-utils/reactHooks/device/useMemoizedIsTablet";
4
4
  import {
@@ -39,13 +39,22 @@ export const useModalSize = (): Size => {
39
39
  MODAL_SIZE_FOR_PORTRAIT
40
40
  );
41
41
 
42
- const setNewModalSize = (size, log) => {
43
- setModalSize(size);
42
+ const setNewModalSize = React.useCallback((newSize, log) => {
43
+ setModalSize((oldSize) => {
44
+ if (
45
+ oldSize.height === newSize.height &&
46
+ oldSize.width === newSize.width
47
+ ) {
48
+ return oldSize;
49
+ }
50
+
51
+ return newSize;
52
+ });
44
53
 
45
54
  logger.debug({
46
55
  message: log,
47
56
  });
48
- };
57
+ }, []);
49
58
 
50
59
  const isTabletLandscape = useIsTabletLandscape();
51
60
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applicaster/zapp-react-native-ui-components",
3
- "version": "12.0.0-alpha.5812543239",
3
+ "version": "12.0.0-alpha.6236157458",
4
4
  "description": "Applicaster Zapp React Native ui components for the Quick Brick App",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -35,10 +35,10 @@
35
35
  "redux-mock-store": "^1.5.3"
36
36
  },
37
37
  "dependencies": {
38
- "@applicaster/applicaster-types": "12.0.0-alpha.5812543239",
39
- "@applicaster/zapp-react-native-bridge": "12.0.0-alpha.5812543239",
40
- "@applicaster/zapp-react-native-redux": "12.0.0-alpha.5812543239",
41
- "@applicaster/zapp-react-native-utils": "12.0.0-alpha.5812543239",
38
+ "@applicaster/applicaster-types": "12.0.0-alpha.6236157458",
39
+ "@applicaster/zapp-react-native-bridge": "12.0.0-alpha.6236157458",
40
+ "@applicaster/zapp-react-native-redux": "12.0.0-alpha.6236157458",
41
+ "@applicaster/zapp-react-native-utils": "12.0.0-alpha.6236157458",
42
42
  "promise": "^8.3.0",
43
43
  "react-router-native": "^5.1.2",
44
44
  "url": "^0.11.0",