ordering-ui-react-native 0.17.16 → 0.17.17
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,7 @@
|
|
|
1
1
|
import React, { useCallback, useEffect, useRef, useState } from 'react'
|
|
2
2
|
import { View, TouchableOpacity, StyleSheet, SafeAreaView, Dimensions, Platform, KeyboardAvoidingViewBase, KeyboardAvoidingView } from 'react-native'
|
|
3
3
|
import { IOScrollView } from 'react-native-intersection-observer'
|
|
4
|
+
import { useSafeAreaInsets } from 'react-native-safe-area-context'
|
|
4
5
|
import { useTheme } from 'styled-components/native';
|
|
5
6
|
import {
|
|
6
7
|
BusinessAndProductList,
|
|
@@ -68,6 +69,7 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
|
|
|
68
69
|
onBusinessClick
|
|
69
70
|
} = props
|
|
70
71
|
|
|
72
|
+
const insets = useSafeAreaInsets()
|
|
71
73
|
const theme = useTheme();
|
|
72
74
|
const [, t] = useLanguage()
|
|
73
75
|
const [{ auth }] = useSession()
|
|
@@ -245,12 +247,13 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
|
|
|
245
247
|
|
|
246
248
|
return (
|
|
247
249
|
<>
|
|
248
|
-
<
|
|
249
|
-
style={{ flex: 1 }}
|
|
250
|
-
isOpenFiltProducts={isOpenFiltProducts}
|
|
251
|
-
>
|
|
250
|
+
<View style={{ flex: 1 }}>
|
|
252
251
|
<Animated.View style={{ position: 'relative' }}>
|
|
253
|
-
<TopHeader
|
|
252
|
+
<TopHeader
|
|
253
|
+
style={{
|
|
254
|
+
marginTop: Platform.OS === 'ios' ? insets.top : '40px'
|
|
255
|
+
}}
|
|
256
|
+
>
|
|
254
257
|
{!isOpenSearchBar && (
|
|
255
258
|
<>
|
|
256
259
|
<TopActions onPress={() => handleBackNavigation()}>
|
|
@@ -512,7 +515,7 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
|
|
|
512
515
|
onAccept={() => setAlertState({ open: false, content: [] })}
|
|
513
516
|
onClose={() => setAlertState({ open: false, content: [] })}
|
|
514
517
|
/>
|
|
515
|
-
</
|
|
518
|
+
</View>
|
|
516
519
|
<OModal
|
|
517
520
|
open={openService}
|
|
518
521
|
onClose={() => setOpenService(false)}
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import styled, { css } from 'styled-components/native'
|
|
2
2
|
|
|
3
|
-
export const ContainerSafeAreaView = styled.SafeAreaView`
|
|
4
|
-
`
|
|
5
|
-
|
|
6
3
|
export const WrapHeader = styled.View`
|
|
7
4
|
position: relative;
|
|
8
5
|
`
|
|
@@ -14,7 +11,6 @@ export const TopHeader = styled.View`
|
|
|
14
11
|
z-index: 1;
|
|
15
12
|
height: 60px;
|
|
16
13
|
min-height: 60px;
|
|
17
|
-
margin-top: ${(props : any) => props.isIos ? '0' : '40px'};
|
|
18
14
|
`
|
|
19
15
|
export const AddressInput = styled.TouchableOpacity`
|
|
20
16
|
flex: 1;
|