ordering-ui-react-native 0.24.7 → 0.24.9
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
|
@@ -87,7 +87,7 @@ export const GoogleMap = (props: GoogleMapsParams) => {
|
|
|
87
87
|
}
|
|
88
88
|
handleChangeAddressMap && handleChangeAddressMap(address, details)
|
|
89
89
|
setSaveLocation && setSaveLocation(false)
|
|
90
|
-
if (
|
|
90
|
+
if (isMovingRegion) {
|
|
91
91
|
handleToggleMap && handleToggleMap()
|
|
92
92
|
}
|
|
93
93
|
} else {
|
|
@@ -1,18 +1,26 @@
|
|
|
1
|
-
import React from 'react'
|
|
1
|
+
import React, { useMemo } from 'react'
|
|
2
2
|
import { Dimensions, Platform } from 'react-native'
|
|
3
3
|
import { WebView } from 'react-native-webview'
|
|
4
4
|
import { useLanguage } from 'ordering-components/native'
|
|
5
|
-
|
|
5
|
+
import { useSafeAreaInsets } from 'react-native-safe-area-context'
|
|
6
6
|
import { Container } from '../../layouts/Container'
|
|
7
7
|
import { NotFoundSource } from '../NotFoundSource'
|
|
8
8
|
import NavBar from '../NavBar'
|
|
9
9
|
|
|
10
|
-
const HEIGHT_SCREEN = Dimensions.get('screen').height
|
|
11
|
-
|
|
12
10
|
export const HelpOptions = (props: any) => {
|
|
13
11
|
const { item, goToBack } = props
|
|
14
12
|
const [, t] = useLanguage()
|
|
15
13
|
|
|
14
|
+
const insets = useSafeAreaInsets()
|
|
15
|
+
|
|
16
|
+
const containerHeight = useMemo(() => {
|
|
17
|
+
const windowHeight = Dimensions.get('window').height
|
|
18
|
+
const bottomPadding = Platform.OS === 'ios' ? insets.bottom : 0
|
|
19
|
+
const navigationBarHeight = Platform.OS === 'android' ? 48 : 0
|
|
20
|
+
const topPadding = (Platform.OS === 'ios' ? 20 : 10) + 48
|
|
21
|
+
return windowHeight - bottomPadding - navigationBarHeight - topPadding
|
|
22
|
+
}, [insets.bottom])
|
|
23
|
+
|
|
16
24
|
return (
|
|
17
25
|
<Container
|
|
18
26
|
pt={Platform.OS === 'ios' ? 20 : 10}
|
|
@@ -30,7 +38,8 @@ export const HelpOptions = (props: any) => {
|
|
|
30
38
|
originWhitelist={['*']}
|
|
31
39
|
automaticallyAdjustContentInsets={false}
|
|
32
40
|
source={{ html: item.body }}
|
|
33
|
-
style={{ flex: 1, height:
|
|
41
|
+
style={{ flex: 1, height: containerHeight }}
|
|
42
|
+
nestedScrollEnabled
|
|
34
43
|
/>
|
|
35
44
|
)}
|
|
36
45
|
{!item?.body && (
|