ordering-ui-react-native 0.16.26-release → 0.16.27-release

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": "ordering-ui-react-native",
3
- "version": "0.16.26-release",
3
+ "version": "0.16.27-release",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -130,6 +130,7 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
130
130
  const [subcategoriesSelected, setSubcategoriesSelected] = useState([])
131
131
  const [openService, setOpenService] = useState(false)
132
132
  const [currentProduct, setCurrentProduct] = useState(null)
133
+ const [searchBarHeight, setSearchBarHeight] = useState(60)
133
134
 
134
135
  const isCheckoutMultiBusinessEnabled: Boolean = configs?.checkout_multi_business_enabled?.value === '1'
135
136
  const openCarts = (Object.values(orderState?.carts)?.filter((cart: any) => cart?.products && cart?.products?.length && cart?.status !== 2 && cart?.valid_schedule && cart?.valid_products && cart?.valid_address && cart?.valid_maximum && cart?.valid_minimum && !cart?.wallets) || null) || []
@@ -262,6 +263,7 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
262
263
  style={{
263
264
  marginTop: Platform.OS === 'ios' ? insets.top : 0
264
265
  }}
266
+ onLayout={(event: any) => setSearchBarHeight(event.nativeEvent.layout.height) }
265
267
  >
266
268
  {!isOpenSearchBar && (
267
269
  <>
@@ -322,9 +324,9 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
322
324
 
323
325
  {business?.categories?.length > 0 && isOpenFiltProducts && (
324
326
  <FiltProductsContainer
325
- isIos={Platform.OS === 'ios'}
326
327
  style={{
327
- height: Dimensions.get('window').height - filtProductsHeight
328
+ height: Dimensions.get('window').height - filtProductsHeight,
329
+ top: Platform.OS === 'ios' ? searchBarHeight + insets.top : searchBarHeight
328
330
  }}
329
331
  contentContainerStyle={{ flexGrow: 1 }}
330
332
  >
@@ -37,9 +37,7 @@ export const BusinessProductsListingContainer = styled.ScrollView`
37
37
  export const FiltProductsContainer = styled.ScrollView`
38
38
  position: absolute;
39
39
  width: 100%;
40
- z-index: 2000;
41
- top: 80px;
42
- margin-top: 20px;
40
+ z-index: 20000;
43
41
  `
44
42
 
45
43
  export const BackgroundGray = styled.View`
@@ -48,7 +46,7 @@ export const BackgroundGray = styled.View`
48
46
  background-color: rgba(0,0,0,0.5);
49
47
  position: absolute;
50
48
  margin-top: 100px;
51
- z-index: 100;
49
+ z-index: 10000;
52
50
  width: 100%;
53
51
  `
54
52
 
@@ -118,9 +118,11 @@ const CheckoutUI = (props: any) => {
118
118
  paddingHorizontal: 40,
119
119
  width: '100%'
120
120
  },
121
- wrapperNavbar: Platform.OS === 'ios'
122
- ? { paddingVertical: 0, paddingHorizontal: 40 }
123
- : { paddingVertical: 20, paddingHorizontal: 40 }
121
+ wrapperNavbar: {
122
+ paddingVertical: 0,
123
+ paddingHorizontal: 40,
124
+ marginVertical: 2
125
+ }
124
126
  })
125
127
 
126
128
  const [, { showToast }] = useToast();
@@ -284,7 +286,6 @@ const CheckoutUI = (props: any) => {
284
286
  onActionLeft={() => navigation?.canGoBack() && navigation.goBack()}
285
287
  showCall={false}
286
288
  btnStyle={{ paddingLeft: 0 }}
287
- style={{ marginTop: Platform.OS === 'ios' ? 0 : 30 }}
288
289
  titleWrapStyle={{ paddingHorizontal: 0 }}
289
290
  titleStyle={{ marginRight: 0, marginLeft: 0 }}
290
291
  />
@@ -187,6 +187,7 @@ export const ProductOptionsUI = (props: any) => {
187
187
  const [headerRefHeight, setHeaderRefHeight] = useState(0)
188
188
  const [summaryRefHeight, setSummaryRefHeight] = useState(0)
189
189
  const [isScrollAvailable, setIsScrollAvailable] = useState(null)
190
+ const [editionsLayoutY, setEditionsLayoutY] = useState(null)
190
191
 
191
192
  const isError = (id: number) => {
192
193
  let bgColor = theme.colors.white;
@@ -295,6 +296,7 @@ export const ProductOptionsUI = (props: any) => {
295
296
  maxProductQuantity === 0 ||
296
297
  Object.keys(errors).length > 0;
297
298
 
299
+
298
300
  const ExtraOptions = ({ eID, options }: any) => (
299
301
  <>
300
302
  {options.map(({ id, name, respect_to, suboptions }: any) => (
@@ -302,19 +304,25 @@ export const ProductOptionsUI = (props: any) => {
302
304
  {respect_to == null && suboptions?.length > 0 && (
303
305
  <TouchableOpacity
304
306
  key={`eopt_key_${id}`}
305
- onPress={() => setSelectedOpt(id)}
307
+ onPress={() => {
308
+ setSelectedOpt(id)
309
+ scrollViewRef?.current?.scrollTo && scrollViewRef.current.scrollTo({
310
+ y: optionLayout[`id:${id}`]?.y + editionsLayoutY - 50,
311
+ animated: true
312
+ })
313
+ }}
306
314
  style={[
307
315
  styles.extraItem,
308
316
  {
309
317
  borderBottomColor:
310
- selOpt == id ? theme.colors.textNormal : theme.colors.border,
318
+ selOpt == id ? theme.colors.textNormal : theme.colors.backgroundPage,
311
319
  },
312
320
  ]}>
313
321
  <OText
314
322
  color={
315
323
  selOpt == id ? theme.colors.textNormal : theme.colors.textSecondary
316
324
  }
317
- size={selOpt == id ? 14 : 12}
325
+ size={12}
318
326
  weight={selOpt == id ? '600' : 'normal'}
319
327
  style={{ maxWidth: 150 }}
320
328
  numberOfLines={1}>
@@ -701,39 +709,34 @@ export const ProductOptionsUI = (props: any) => {
701
709
  <ExtraOptionWrap
702
710
  horizontal
703
711
  showsHorizontalScrollIndicator={false}
704
- style={{ marginBottom: 20 }}
705
- contentContainerStyle={{ paddingHorizontal: 33, backgroundColor: theme.colors.white }}
712
+ style={{
713
+ marginBottom: 20,
714
+ borderBottomWidth: 1,
715
+ borderBottomColor: theme.colors.border,
716
+ marginHorizontal: 30,
717
+ backgroundColor: theme.colors.backgroundPage,
718
+ }}
706
719
  >
707
- <TouchableOpacity
708
- key={`eopt_key_00`}
709
- onPress={() => setSelectedOpt(-1)}
710
- style={[
711
- styles.extraItem,
712
- {
713
- borderBottomColor: selOpt == -1 ? theme.colors.textNormal : theme.colors.border,
714
- },
715
- ]}>
716
- <OText
717
- color={selOpt == -1 ? theme.colors.textNormal : theme.colors.textSecondary}
718
- size={selOpt == -1 ? 14 : 12}
719
- weight={selOpt == -1 ? '600' : 'normal'}>
720
- {t('ALL', 'All')}
721
- </OText>
722
- </TouchableOpacity>
723
720
  {product?.ingredients.length > 0 && (
724
721
  <TouchableOpacity
725
722
  key={`eopt_key_01`}
726
- onPress={() => setSelectedOpt(0)}
723
+ onPress={() => {
724
+ setSelectedOpt(0)
725
+ scrollViewRef?.current?.scrollTo && scrollViewRef.current.scrollTo({
726
+ y: optionLayout[`id:0`]?.y + editionsLayoutY - 50,
727
+ animated: true
728
+ })
729
+ }}
727
730
  style={[
728
731
  styles.extraItem,
729
732
  {
730
733
  borderBottomColor:
731
- selOpt == 0 ? theme.colors.textNormal : theme.colors.border,
734
+ selOpt == 0 ? theme.colors.textNormal : theme.colors.backgroundPage,
732
735
  },
733
736
  ]}>
734
737
  <OText
735
738
  color={selOpt == 0 ? theme.colors.textNormal : theme.colors.textSecondary}
736
- size={selOpt == 0 ? 14 : 12}
739
+ size={12}
737
740
  weight={selOpt == 0 ? '600' : 'normal'}>
738
741
  {t('INGREDIENTS', 'Ingredients')}
739
742
  </OText>
@@ -783,184 +786,93 @@ export const ProductOptionsUI = (props: any) => {
783
786
  ))}
784
787
  </>
785
788
  ) : (
786
- <ProductEditions>
787
- {selOpt === -1 ? (
788
- <>
789
- {product?.ingredients.length > 0 && (
790
- <View style={styles.optionContainer} onLayout={(event: any) => handleOnLayout(event, 0)}>
791
- <SectionTitle>
792
- <OText size={16}>
793
- {t('INGREDIENTS', 'Ingredients')}
794
- </OText>
795
- </SectionTitle>
796
- <WrapperIngredients>
797
- {product?.ingredients.map((ingredient: any) => (
798
- <ProductIngredient
799
- key={ingredient.id}
800
- ingredient={ingredient}
801
- state={
802
- productCart.ingredients[`id:${ingredient.id}`]
803
- }
804
- onChange={handleChangeIngredientState}
805
- isSoldOut={isSoldOut}
806
- />
807
- ))}
808
- </WrapperIngredients>
809
- </View>
810
- )}
811
- {product?.extras.sort((a: any, b: any) => a.rank - b.rank).map((extra: any) =>
812
- extra.options.sort((a: any, b: any) => a.rank - b.rank).map((option: any) => {
813
- const currentState =
814
- productCart.options[`id:${option.id}`] || {};
815
- return (
816
- <React.Fragment key={`popt_${option.id}`}>
817
- {showOption(option) && (
818
- <View style={styles.optionContainer} onLayout={(event: any) => handleOnLayout(event, option?.id)}>
819
- <ProductOption
820
- option={option}
821
- currentState={currentState}
822
- error={errors[`id:${option.id}`]}>
823
- <WrapperSubOption
824
- style={{
825
- backgroundColor: isError(option.id),
826
- borderRadius: 7.6
827
- }}>
828
- {option.suboptions.sort((a: any, b: any) => a.rank - b.rank).map(
829
- (suboption: any) => {
830
- const currentState =
831
- productCart.options[
832
- `id:${option.id}`
833
- ]?.suboptions[
834
- `id:${suboption.id}`
835
- ] || {};
836
- const balance =
837
- productCart.options[
838
- `id:${option.id}`
839
- ]?.balance || 0;
840
- return (
841
- <ProductOptionSubOption
842
- key={suboption.id}
843
- isSoldOut={isSoldOut}
844
- onChange={
845
- handleChangeSuboptionState
846
- }
847
- balance={balance}
848
- option={option}
849
- suboption={suboption}
850
- state={currentState}
851
- disabled={
852
- isSoldOut ||
853
- maxProductQuantity <= 0
854
- }
855
- setIsScrollAvailable={setIsScrollAvailable}
856
- error={errors[`id:${option.id}`]}
857
- />
858
- );
859
- },
860
- )}
861
- </WrapperSubOption>
862
- </ProductOption>
863
- </View>
864
- )}
865
- </React.Fragment>
866
- );
867
- }),
868
- )}
869
- </>
870
- ) : (
871
- <>
872
- {selOpt === 0 ? (
873
- <View style={styles.optionContainer}>
874
- <SectionTitle>
875
- <OText size={16}>
876
- {t('INGREDIENTS', 'Ingredients')}
877
- </OText>
878
- </SectionTitle>
879
- <WrapperIngredients>
880
- {product?.ingredients.map((ingredient: any) => (
881
- <ProductIngredient
882
- key={ingredient.id}
883
- ingredient={ingredient}
884
- state={
885
- productCart.ingredients[`id:${ingredient.id}`]
886
- }
887
- onChange={handleChangeIngredientState}
888
- isSoldOut={isSoldOut}
889
- />
890
- ))}
891
- </WrapperIngredients>
892
- </View>
893
- ) : (
894
- <>
895
- {product?.extras.map((extra: any) =>
896
- extra.options.sort((a: any, b: any) => a.rank - b.rank).map((option: any) => {
897
- if (
898
- option.id == selOpt ||
899
- (hasRespected(
900
- extra.options,
901
- option.respect_to,
902
- ) &&
903
- showOption(option))
904
- ) {
905
- const currentState =
906
- productCart.options[`id:${option.id}`] || {};
907
- return (
908
- <React.Fragment key={option.id}>
909
- {showOption(option) && (
910
- <View style={styles.optionContainer}>
911
- <ProductOption
912
- option={option}
913
- currentState={currentState}
914
- error={errors[`id:${option.id}`]}>
915
- <WrapperSubOption
916
- style={{
917
- backgroundColor: isError(
918
- option.id,
919
- ),
920
- }}>
921
- {option.suboptions.sort((a: any, b: any) => a.rank - b.rank).map(
922
- (suboption: any) => {
923
- const currentState =
924
- productCart.options[
925
- `id:${option.id}`
926
- ]?.suboptions[
927
- `id:${suboption.id}`
928
- ] || {};
929
- const balance =
930
- productCart.options[
931
- `id:${option.id}`
932
- ]?.balance || 0;
933
- return (
934
- <ProductOptionSubOption
935
- key={suboption.id}
936
- onChange={
937
- handleChangeSuboptionState
938
- }
939
- balance={balance}
940
- option={option}
941
- suboption={suboption}
942
- state={currentState}
943
- disabled={
944
- isSoldOut ||
945
- maxProductQuantity <= 0
946
- }
947
- />
948
- );
949
- },
950
- )}
951
- </WrapperSubOption>
952
- </ProductOption>
953
- </View>
954
- )}
955
- </React.Fragment>
956
- );
789
+ <ProductEditions
790
+ onLayout={(event: any) => {
791
+ setEditionsLayoutY(event.nativeEvent.layout?.y)
792
+ }}
793
+ >
794
+ <>
795
+ {product?.ingredients.length > 0 && (
796
+ <View style={styles.optionContainer} onLayout={(event: any) => handleOnLayout(event, 0)}>
797
+ <SectionTitle>
798
+ <OText size={16}>
799
+ {t('INGREDIENTS', 'Ingredients')}
800
+ </OText>
801
+ </SectionTitle>
802
+ <WrapperIngredients>
803
+ {product?.ingredients.map((ingredient: any) => (
804
+ <ProductIngredient
805
+ key={ingredient.id}
806
+ ingredient={ingredient}
807
+ state={
808
+ productCart.ingredients[`id:${ingredient.id}`]
957
809
  }
958
- }),
959
- )}
960
- </>
961
- )}
962
- </>
963
- )}
810
+ onChange={handleChangeIngredientState}
811
+ isSoldOut={isSoldOut}
812
+ />
813
+ ))}
814
+ </WrapperIngredients>
815
+ </View>
816
+ )}
817
+ {product?.extras.sort((a: any, b: any) => a.rank - b.rank).map((extra: any) =>
818
+ extra.options.sort((a: any, b: any) => a.rank - b.rank).map((option: any) => {
819
+ const currentState =
820
+ productCart.options[`id:${option.id}`] || {};
821
+ return (
822
+ <React.Fragment key={`popt_${option.id}`}>
823
+ {showOption(option) && (
824
+ <View style={styles.optionContainer} onLayout={(event: any) => handleOnLayout(event, option?.id)}>
825
+ <ProductOption
826
+ option={option}
827
+ currentState={currentState}
828
+ error={errors[`id:${option.id}`]}>
829
+ <WrapperSubOption
830
+ style={{
831
+ backgroundColor: isError(option.id),
832
+ borderRadius: 7.6
833
+ }}>
834
+ {option.suboptions.sort((a: any, b: any) => a.rank - b.rank).map(
835
+ (suboption: any) => {
836
+ const currentState =
837
+ productCart.options[
838
+ `id:${option.id}`
839
+ ]?.suboptions[
840
+ `id:${suboption.id}`
841
+ ] || {};
842
+ const balance =
843
+ productCart.options[
844
+ `id:${option.id}`
845
+ ]?.balance || 0;
846
+ return (
847
+ <ProductOptionSubOption
848
+ key={suboption.id}
849
+ isSoldOut={isSoldOut}
850
+ onChange={
851
+ handleChangeSuboptionState
852
+ }
853
+ balance={balance}
854
+ option={option}
855
+ suboption={suboption}
856
+ state={currentState}
857
+ disabled={
858
+ isSoldOut ||
859
+ maxProductQuantity <= 0
860
+ }
861
+ setIsScrollAvailable={setIsScrollAvailable}
862
+ error={errors[`id:${option.id}`]}
863
+ />
864
+ );
865
+ },
866
+ )}
867
+ </WrapperSubOption>
868
+ </ProductOption>
869
+ </View>
870
+ )}
871
+ </React.Fragment>
872
+ );
873
+ }),
874
+ )}
875
+ </>
964
876
  {!product?.hide_special_instructions && (
965
877
  <ProductComment>
966
878
  <SectionTitle>
@@ -9,7 +9,7 @@ export const TopActions = styled.TouchableOpacity`
9
9
  height: 60px;
10
10
  justify-content: center;
11
11
  padding-horizontal: 30px;
12
- width: 80px;
12
+ width: 100px;
13
13
  `;
14
14
 
15
15
  export const TopHeader = styled.View`
@@ -82,7 +82,6 @@ export const ProductActions = styled.View`
82
82
  border-top-color: ${(props: any) => props.theme.colors.border};
83
83
  `
84
84
  export const ExtraOptionWrap = styled.ScrollView`
85
- margin-horizontal: 30px;
86
85
  `;
87
86
 
88
87
  export const WeightUnitSwitch = styled.View`
@@ -60,7 +60,7 @@ const ServiceFormUI = (props: ServiceFormParams) => {
60
60
  const [selectDate, setSelectedDate] = useState<any>(new Date())
61
61
  const [timeList, setTimeList] = useState<any>([])
62
62
  const [isEnabled, setIsEnabled] = useState(false)
63
- const [timeSelected, setTimeSelected] = useState(null)
63
+ const [timeSelected, setTimeSelected] = useState<string | null>(null)
64
64
  const [dateSelected, setDateSelected] = useState<any>(null)
65
65
  const [isOpen, setIsOpen] = useState(false)
66
66
  const [currentProfessional, setCurrentProfessional] = useState<any>(null)
@@ -248,6 +248,12 @@ const ServiceFormUI = (props: ServiceFormParams) => {
248
248
  setCurrentProfessional(professional)
249
249
  }
250
250
  }, [isCartProduct, professionalListState?.professionals])
251
+
252
+ useEffect(() => {
253
+ if (!productCart?.calendar_event?.start) return
254
+ setSelectedDate(moment.utc(productCart?.calendar_event?.start).local())
255
+ setTimeSelected(moment.utc(productCart?.calendar_event?.start).local().format('HH:mm'))
256
+ }, [productCart])
251
257
 
252
258
  return (
253
259
  <>
@@ -409,7 +415,7 @@ const ServiceFormUI = (props: ServiceFormParams) => {
409
415
  {(timeList?.length > 0 && isEnabled) ? (
410
416
  <SelectDropdown
411
417
  ref={dropdownRef}
412
- defaultValue={timeSelected}
418
+ defaultValueByIndex={timeList.findIndex((item: any) => item.value === timeSelected)}
413
419
  data={timeList}
414
420
  onSelect={(selectedItem, index) => {
415
421
  setTimeSelected(selectedItem?.value)
@@ -1,5 +1,5 @@
1
1
  import React, { useState, useEffect } from 'react'
2
- import { Pressable, StyleSheet, View, ScrollView } from 'react-native';
2
+ import { Pressable, StyleSheet, View, ScrollView, TouchableOpacity } from 'react-native';
3
3
  import { useTheme } from 'styled-components/native'
4
4
  import { Fade, Placeholder, PlaceholderLine } from 'rn-placeholder';
5
5
  import FastImage from 'react-native-fast-image'
@@ -24,7 +24,6 @@ import {
24
24
  WalletTransactionsWrapper
25
25
  } from './styles'
26
26
 
27
- import NavBar from '../NavBar'
28
27
  import { OButton, OIcon, OText, OModal } from '../shared';
29
28
  import { NotFoundSource } from '../NotFoundSource';
30
29
  import { WalletTransactions } from '../WalletTransactions'
@@ -78,7 +77,7 @@ const WalletsUI = (props: any) => {
78
77
  isActive: isWalletCashEnabled
79
78
  },
80
79
  credit_point: {
81
- name: t('CREDITS_POINTS_WALLET', 'Credit Points Wallet'),
80
+ name: t('POINTS_WALLET', 'Points Wallet'),
82
81
  value: 1,
83
82
  isActive: isWalletPointsEnabled
84
83
  }
@@ -112,15 +111,7 @@ const WalletsUI = (props: any) => {
112
111
  <>
113
112
  <Container>
114
113
  <Header>
115
- <NavBar
116
- title={isChewLayout ? '' : t('WALLETS', 'Wallets')}
117
- titleAlign={'center'}
118
- onActionLeft={goToBack}
119
- showCall={false}
120
- paddingTop={10}
121
- btnStyle={{ paddingLeft: 0 }}
122
- style={{ flex: 1 }}
123
- />
114
+ <OText size={24} style={{ marginTop: 30 }}>{t('WALLETS', 'Wallets')}</OText>
124
115
  {isChewLayout && (
125
116
  <OButton
126
117
  text={t('WALLET_HISTORY', 'Wallet history')}
@@ -145,16 +136,25 @@ const WalletsUI = (props: any) => {
145
136
  showsHorizontalScrollIndicator={false}
146
137
  >
147
138
  {walletList.wallets?.map((wallet: any) => walletName[wallet.type]?.isActive && (
148
- <Pressable
139
+ <TouchableOpacity
149
140
  key={wallet.id}
150
141
  onPress={() => handleChangeTab(wallet)}
151
142
  >
152
- <OTab isSelected={tabSelected === wallet.type}>
153
- <OText size={18} color={tabSelected === wallet.type && theme.colors.primary}>
143
+ <OTab
144
+ isSelected={tabSelected === wallet.type}
145
+ style={{
146
+ borderBottomWidth: 1,
147
+ borderBottomColor:
148
+ tabSelected === wallet.type
149
+ ? theme.colors.textNormal
150
+ : theme.colors.border
151
+ }}
152
+ >
153
+ <OText>
154
154
  {walletName[wallet.type]?.name}
155
155
  </OText>
156
156
  </OTab>
157
- </Pressable>
157
+ </TouchableOpacity>
158
158
  ))}
159
159
  </OTabs>
160
160
 
@@ -34,10 +34,12 @@ export const OTabs = styled.View`
34
34
  flex-direction: row;
35
35
  width: 100%;
36
36
  flex-wrap: wrap;
37
+ padding-vertical: 5px;
37
38
  `;
38
39
 
39
40
  export const OTab = styled.View`
40
41
  padding-horizontal: 10px;
42
+ padding-vertical: 10px;
41
43
  `;
42
44
 
43
45
  export const LoyaltyContent = styled.View`
@@ -33,7 +33,7 @@ const OBottomPopup = (props: Props) => {
33
33
 
34
34
  return (
35
35
  <Modal
36
- animationType='slide'
36
+ animationType='fade'
37
37
  transparent={transparent}
38
38
  visible={open}
39
39
  onRequestClose={() => onClose()}
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
- import styled, { css } from 'styled-components/native';
3
- import { Platform } from 'react-native';
2
+ import { useSafeAreaInsets } from 'react-native-safe-area-context'
3
+ import styled, { css, useTheme } from 'styled-components/native';
4
+ import { Platform, View } from 'react-native';
4
5
 
5
6
  const ContainerStyled = styled.ScrollView`
6
7
  flex: 1;
@@ -10,17 +11,20 @@ const ContainerStyled = styled.ScrollView`
10
11
  background-color: ${(props: any) => props.theme.colors.backgroundPage};
11
12
  `;
12
13
 
13
- const SafeAreaStyled = styled.SafeAreaView`
14
- flex: 1;
15
- background-color: ${(props: any) => props.theme.colors.backgroundPage};
16
- `;
17
-
18
14
  export const Container = (props: any) => {
15
+ const theme = useTheme()
16
+ const insets = useSafeAreaInsets()
19
17
  return (
20
- <SafeAreaStyled>
18
+ <View
19
+ style={{
20
+ flex: 1,
21
+ paddingTop: insets.top,
22
+ backgroundColor: theme.colors.backgroundPage
23
+ }}
24
+ >
21
25
  <ContainerStyled {...props} ref={props?.forwardRef} keyboardShouldPersistTaps='handled' style={{...props.style}}>
22
26
  {props.children}
23
27
  </ContainerStyled>
24
- </SafeAreaStyled>
28
+ </View>
25
29
  )
26
30
  }