ordering-ui-react-native 0.12.57 → 0.12.61

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.
Files changed (182) hide show
  1. package/package.json +1 -1
  2. package/src/components/AppleLogin/index.tsx +14 -8
  3. package/themes/doordash/src/components/Cart/index.tsx +1 -0
  4. package/themes/doordash/src/components/LastOrders/index.tsx +1 -1
  5. package/themes/doordash/src/components/OrderSummary/index.tsx +1 -0
  6. package/themes/instacart/src/components/OrderDetails/index.tsx +2 -2
  7. package/themes/single-business/src/components/Cart/index.tsx +127 -16
  8. package/themes/single-business/src/components/Cart/styles.tsx +39 -0
  9. package/themes/single-business/src/components/CartContent/index.tsx +56 -52
  10. package/themes/single-business/src/components/CartContent/styles.tsx +2 -16
  11. package/themes/single-business/src/components/OrderDetails/index.tsx +724 -708
  12. package/themes/single-business/src/components/OrderSummary/index.tsx +189 -154
  13. package/themes/franchises/index.tsx +0 -111
  14. package/themes/franchises/src/components/ActiveOrders/index.tsx +0 -134
  15. package/themes/franchises/src/components/ActiveOrders/styles.tsx +0 -44
  16. package/themes/franchises/src/components/AddressDetails/index.tsx +0 -77
  17. package/themes/franchises/src/components/AddressDetails/styles.tsx +0 -21
  18. package/themes/franchises/src/components/AddressForm/index.tsx +0 -837
  19. package/themes/franchises/src/components/AddressForm/styles.tsx +0 -27
  20. package/themes/franchises/src/components/AddressList/index.tsx +0 -338
  21. package/themes/franchises/src/components/AddressList/styles.tsx +0 -20
  22. package/themes/franchises/src/components/AppleLogin/index.tsx +0 -149
  23. package/themes/franchises/src/components/AppleLogin/styles.tsx +0 -21
  24. package/themes/franchises/src/components/BottomWrapper/index.tsx +0 -29
  25. package/themes/franchises/src/components/BusinessBasicInformation/index.tsx +0 -310
  26. package/themes/franchises/src/components/BusinessBasicInformation/styles.tsx +0 -66
  27. package/themes/franchises/src/components/BusinessController/index.tsx +0 -184
  28. package/themes/franchises/src/components/BusinessController/styles.tsx +0 -64
  29. package/themes/franchises/src/components/BusinessFeaturedController/index.tsx +0 -189
  30. package/themes/franchises/src/components/BusinessFeaturedController/styles.tsx +0 -50
  31. package/themes/franchises/src/components/BusinessInformation/index.tsx +0 -202
  32. package/themes/franchises/src/components/BusinessInformation/styles.tsx +0 -39
  33. package/themes/franchises/src/components/BusinessItemAccordion/index.tsx +0 -125
  34. package/themes/franchises/src/components/BusinessItemAccordion/styles.tsx +0 -54
  35. package/themes/franchises/src/components/BusinessProductsCategories/index.tsx +0 -87
  36. package/themes/franchises/src/components/BusinessProductsCategories/styles.tsx +0 -8
  37. package/themes/franchises/src/components/BusinessProductsList/index.tsx +0 -199
  38. package/themes/franchises/src/components/BusinessProductsList/styles.tsx +0 -14
  39. package/themes/franchises/src/components/BusinessProductsListing/index.tsx +0 -292
  40. package/themes/franchises/src/components/BusinessProductsListing/styles.tsx +0 -30
  41. package/themes/franchises/src/components/BusinessReviews/index.tsx +0 -249
  42. package/themes/franchises/src/components/BusinessReviews/styles.tsx +0 -59
  43. package/themes/franchises/src/components/BusinessTypeFilter/index.tsx +0 -127
  44. package/themes/franchises/src/components/BusinessTypeFilter/styles.tsx +0 -40
  45. package/themes/franchises/src/components/BusinessesListing/index.tsx +0 -339
  46. package/themes/franchises/src/components/BusinessesListing/styles.tsx +0 -92
  47. package/themes/franchises/src/components/Cart/index.tsx +0 -332
  48. package/themes/franchises/src/components/Cart/styles.tsx +0 -28
  49. package/themes/franchises/src/components/CartContent/index.tsx +0 -60
  50. package/themes/franchises/src/components/CartContent/styles.tsx +0 -19
  51. package/themes/franchises/src/components/Checkout/index.tsx +0 -664
  52. package/themes/franchises/src/components/Checkout/styles.tsx +0 -89
  53. package/themes/franchises/src/components/CouponControl/index.tsx +0 -119
  54. package/themes/franchises/src/components/CouponControl/styles.tsx +0 -22
  55. package/themes/franchises/src/components/DriverTips/index.tsx +0 -167
  56. package/themes/franchises/src/components/DriverTips/styles.tsx +0 -63
  57. package/themes/franchises/src/components/FacebookLogin/index.tsx +0 -107
  58. package/themes/franchises/src/components/FacebookLogin/styles.tsx +0 -21
  59. package/themes/franchises/src/components/FloatingButton/index.tsx +0 -100
  60. package/themes/franchises/src/components/FloatingButton/styles.tsx +0 -26
  61. package/themes/franchises/src/components/ForgotPasswordForm/index.tsx +0 -156
  62. package/themes/franchises/src/components/ForgotPasswordForm/styles.tsx +0 -11
  63. package/themes/franchises/src/components/GPSButton/index.tsx +0 -84
  64. package/themes/franchises/src/components/GPSButton/styles.ts +0 -6
  65. package/themes/franchises/src/components/GoogleLogin/index.tsx +0 -122
  66. package/themes/franchises/src/components/GoogleLogin/styles.tsx +0 -23
  67. package/themes/franchises/src/components/GoogleMap/index.tsx +0 -229
  68. package/themes/franchises/src/components/Help/index.tsx +0 -56
  69. package/themes/franchises/src/components/Help/styles.tsx +0 -11
  70. package/themes/franchises/src/components/HelpAccountAndPayment/index.tsx +0 -68
  71. package/themes/franchises/src/components/HelpAccountAndPayment/styles.tsx +0 -6
  72. package/themes/franchises/src/components/HelpGuide/index.tsx +0 -67
  73. package/themes/franchises/src/components/HelpGuide/styles.tsx +0 -6
  74. package/themes/franchises/src/components/HelpOrder/index.tsx +0 -79
  75. package/themes/franchises/src/components/HelpOrder/styles.tsx +0 -6
  76. package/themes/franchises/src/components/Home/index.tsx +0 -102
  77. package/themes/franchises/src/components/Home/styles.tsx +0 -18
  78. package/themes/franchises/src/components/LanguageSelector/index.tsx +0 -98
  79. package/themes/franchises/src/components/LanguageSelector/styles.tsx +0 -7
  80. package/themes/franchises/src/components/LastOrder/index.tsx +0 -168
  81. package/themes/franchises/src/components/LastOrder/styles.tsx +0 -16
  82. package/themes/franchises/src/components/LastOrders/index.tsx +0 -104
  83. package/themes/franchises/src/components/LastOrders/styles.tsx +0 -17
  84. package/themes/franchises/src/components/LoginForm/index.tsx +0 -512
  85. package/themes/franchises/src/components/LoginForm/styles.tsx +0 -77
  86. package/themes/franchises/src/components/LogoutButton/index.tsx +0 -36
  87. package/themes/franchises/src/components/Messages/index.tsx +0 -359
  88. package/themes/franchises/src/components/Messages/styles.tsx +0 -20
  89. package/themes/franchises/src/components/MomentOption/index.tsx +0 -321
  90. package/themes/franchises/src/components/MomentOption/styles.tsx +0 -66
  91. package/themes/franchises/src/components/NavBar/index.tsx +0 -129
  92. package/themes/franchises/src/components/NotFoundSource/index.tsx +0 -50
  93. package/themes/franchises/src/components/NotFoundSource/styles.tsx +0 -16
  94. package/themes/franchises/src/components/Notifications/index.tsx +0 -120
  95. package/themes/franchises/src/components/Notifications/styles.ts +0 -21
  96. package/themes/franchises/src/components/OrderDetails/index.tsx +0 -828
  97. package/themes/franchises/src/components/OrderDetails/styles.tsx +0 -120
  98. package/themes/franchises/src/components/OrderSummary/index.tsx +0 -266
  99. package/themes/franchises/src/components/OrderSummary/styles.tsx +0 -41
  100. package/themes/franchises/src/components/OrderTypeSelector/index.tsx +0 -92
  101. package/themes/franchises/src/components/OrderTypeSelector/styles.tsx +0 -27
  102. package/themes/franchises/src/components/OrdersOption/index.tsx +0 -243
  103. package/themes/franchises/src/components/OrdersOption/styles.tsx +0 -5
  104. package/themes/franchises/src/components/PaymentOptionCash/index.tsx +0 -102
  105. package/themes/franchises/src/components/PaymentOptionCash/styles.tsx +0 -18
  106. package/themes/franchises/src/components/PaymentOptionStripe/index.tsx +0 -234
  107. package/themes/franchises/src/components/PaymentOptionStripe/styles.tsx +0 -71
  108. package/themes/franchises/src/components/PaymentOptions/index.tsx +0 -430
  109. package/themes/franchises/src/components/PaymentOptions/styles.tsx +0 -77
  110. package/themes/franchises/src/components/PhoneInputNumber/index.tsx +0 -127
  111. package/themes/franchises/src/components/PhoneInputNumber/styles.tsx +0 -3
  112. package/themes/franchises/src/components/PreviousOrders/index.tsx +0 -188
  113. package/themes/franchises/src/components/PreviousOrders/styles.tsx +0 -33
  114. package/themes/franchises/src/components/ProductForm/index.tsx +0 -695
  115. package/themes/franchises/src/components/ProductForm/styles.tsx +0 -78
  116. package/themes/franchises/src/components/ProductIngredient/index.tsx +0 -43
  117. package/themes/franchises/src/components/ProductIngredient/styles.tsx +0 -7
  118. package/themes/franchises/src/components/ProductItemAccordion/index.tsx +0 -276
  119. package/themes/franchises/src/components/ProductItemAccordion/styles.tsx +0 -57
  120. package/themes/franchises/src/components/ProductOption/index.tsx +0 -50
  121. package/themes/franchises/src/components/ProductOption/styles.tsx +0 -11
  122. package/themes/franchises/src/components/ProductOptionSubOption/index.tsx +0 -146
  123. package/themes/franchises/src/components/ProductOptionSubOption/styles.tsx +0 -32
  124. package/themes/franchises/src/components/ReviewDriver/index.tsx +0 -221
  125. package/themes/franchises/src/components/ReviewDriver/styles.tsx +0 -46
  126. package/themes/franchises/src/components/ReviewOrder/index.tsx +0 -325
  127. package/themes/franchises/src/components/ReviewOrder/styles.tsx +0 -46
  128. package/themes/franchises/src/components/ReviewProduct/index.tsx +0 -275
  129. package/themes/franchises/src/components/ReviewProduct/styles.tsx +0 -53
  130. package/themes/franchises/src/components/SearchBar/index.tsx +0 -139
  131. package/themes/franchises/src/components/SignupForm/index.tsx +0 -643
  132. package/themes/franchises/src/components/SignupForm/styles.tsx +0 -27
  133. package/themes/franchises/src/components/SingleProductCard/index.tsx +0 -124
  134. package/themes/franchises/src/components/SingleProductCard/styles.tsx +0 -23
  135. package/themes/franchises/src/components/StripeCardForm/index.tsx +0 -97
  136. package/themes/franchises/src/components/StripeCardForm/naked.tsx +0 -128
  137. package/themes/franchises/src/components/StripeCardForm/styles.tsx +0 -32
  138. package/themes/franchises/src/components/StripeCardsList/index.tsx +0 -182
  139. package/themes/franchises/src/components/StripeElementsForm/index.tsx +0 -204
  140. package/themes/franchises/src/components/StripeElementsForm/naked.tsx +0 -90
  141. package/themes/franchises/src/components/StripeElementsForm/styles.tsx +0 -13
  142. package/themes/franchises/src/components/StripeRedirectForm/index.tsx +0 -159
  143. package/themes/franchises/src/components/StripeRedirectForm/styles.tsx +0 -23
  144. package/themes/franchises/src/components/TagSelector/index.tsx +0 -94
  145. package/themes/franchises/src/components/TagSelector/styles.ts +0 -0
  146. package/themes/franchises/src/components/TaxInformation/index.tsx +0 -51
  147. package/themes/franchises/src/components/TaxInformation/styles.tsx +0 -9
  148. package/themes/franchises/src/components/UpsellingProducts/index.tsx +0 -222
  149. package/themes/franchises/src/components/UpsellingProducts/styles.tsx +0 -50
  150. package/themes/franchises/src/components/UserDetails/index.tsx +0 -134
  151. package/themes/franchises/src/components/UserDetails/styles.tsx +0 -26
  152. package/themes/franchises/src/components/UserFormDetails/index.tsx +0 -351
  153. package/themes/franchises/src/components/UserFormDetails/styles.tsx +0 -35
  154. package/themes/franchises/src/components/UserProfile/index.tsx +0 -179
  155. package/themes/franchises/src/components/UserProfile/styles.ts +0 -42
  156. package/themes/franchises/src/components/UserProfileForm/index.tsx +0 -253
  157. package/themes/franchises/src/components/UserProfileForm/styles.tsx +0 -29
  158. package/themes/franchises/src/components/VerifyPhone/index.tsx +0 -188
  159. package/themes/franchises/src/components/VerifyPhone/styles.tsx +0 -43
  160. package/themes/franchises/src/components/shared/OAlert.tsx +0 -55
  161. package/themes/franchises/src/components/shared/OBottomPopup.tsx +0 -73
  162. package/themes/franchises/src/components/shared/OBottomStickBar.tsx +0 -62
  163. package/themes/franchises/src/components/shared/OButton.tsx +0 -132
  164. package/themes/franchises/src/components/shared/ODropDown.tsx +0 -169
  165. package/themes/franchises/src/components/shared/OIcon.tsx +0 -53
  166. package/themes/franchises/src/components/shared/OIconButton.tsx +0 -127
  167. package/themes/franchises/src/components/shared/OIconText.tsx +0 -54
  168. package/themes/franchises/src/components/shared/OInput.tsx +0 -113
  169. package/themes/franchises/src/components/shared/OKeyButton.tsx +0 -35
  170. package/themes/franchises/src/components/shared/OModal.tsx +0 -172
  171. package/themes/franchises/src/components/shared/OText.tsx +0 -52
  172. package/themes/franchises/src/components/shared/OTextarea.tsx +0 -36
  173. package/themes/franchises/src/components/shared/OToast.tsx +0 -93
  174. package/themes/franchises/src/components/shared/OToggle.tsx +0 -158
  175. package/themes/franchises/src/components/shared/index.tsx +0 -29
  176. package/themes/franchises/src/config/constants.tsx +0 -57
  177. package/themes/franchises/src/layouts/Container.tsx +0 -23
  178. package/themes/franchises/src/layouts/SafeAreaContainer.tsx +0 -6
  179. package/themes/franchises/src/providers/AlertProvider.tsx +0 -43
  180. package/themes/franchises/src/providers/StoreUtil.tsx +0 -50
  181. package/themes/franchises/src/types/index.tsx +0 -445
  182. package/themes/franchises/src/utils/index.tsx +0 -222
@@ -1,66 +0,0 @@
1
- import styled, { css } from 'styled-components/native'
2
-
3
- export const Container = styled.ScrollView`
4
- flex: 1;
5
- background-color: ${(props: any) => props.theme.colors.backgroundPage};
6
- padding: 0 20px;
7
- padding-bottom: 20px;
8
- `
9
- export const HeaderTitle = styled.View`
10
- flex-direction: column;
11
- margin-bottom: 20px;
12
- `
13
- export const WrapSelectOption = styled.TouchableOpacity`
14
- flex-direction: row;
15
- align-items: center;
16
- margin-vertical: 5px;
17
- `
18
- export const Days = styled.View`
19
- flex-wrap: wrap;
20
- flex-direction: row;
21
- margin-vertical: 10px;
22
- `
23
- export const Day = styled.TouchableOpacity`
24
- display: flex;
25
- flex-direction: column;
26
- align-items: center;
27
- justify-content: center;
28
- border-right-width: 1px;
29
- width: 25%;
30
- margin-vertical: 10px;
31
- border-color: ${(props: any) => props.theme.colors.textSecondary};
32
-
33
- ${(props: any) => props.borderLeftShow && css`
34
- border-left-width: 1px;
35
- `}
36
- `
37
- export const WrapHours = styled.ScrollView`
38
- border-width: 1px;
39
- border-color: ${(props: any) => props.theme.colors.border};
40
- border-radius: 7.6px;
41
- margin-top: 6px;
42
- height: 140px;
43
- max-height: 140px;
44
- `
45
- export const Hours = styled.View`
46
- flex: 1;
47
- flex-wrap: wrap;
48
- flex-direction: row;
49
- justify-content: space-between;
50
- margin: 0 20px;
51
- `
52
- export const Hour = styled.TouchableOpacity`
53
- flex-direction: row;
54
- justify-content: center;
55
- align-items: center;
56
- padding: 5px;
57
- border-width: 1px;
58
- border-radius: 7.6px;
59
- border-color: ${(props: any) => props.theme.colors.border};
60
- width: 90px;
61
- margin-vertical: 7px;
62
- `
63
-
64
- export const WrapDelveryTime = styled.View`
65
- flex: 1;
66
- `
@@ -1,129 +0,0 @@
1
- import * as React from 'react'
2
- import styled, { useTheme } from 'styled-components/native'
3
- import { OButton, OIcon, OText } from '../shared'
4
- import { Platform, TextStyle, ViewStyle, I18nManager, ImageStyle } from 'react-native'
5
-
6
- const TitleWrapper = styled.View`
7
- flex-direction: column;
8
- padding-horizontal: 10px;
9
- `
10
- const TitleTopWrapper = styled.View`
11
- flex-grow: 1;
12
- flex-direction: row;
13
- align-items: center;
14
- `
15
-
16
- const Wrapper = styled.View`
17
- background-color: ${(props: any) => props.theme.colors.white};
18
- padding: 10px 20px 20px 0px;
19
- flex-direction: row;
20
- justify-content: center;
21
- align-items: center;
22
- position: relative;
23
- `
24
-
25
- const btnBackArrow = {
26
- borderWidth: 0,
27
- backgroundColor: '#FFF',
28
- borderColor: '#FFF',
29
- shadowColor: '#FFF'
30
- }
31
-
32
- interface Props {
33
- navigation?: any,
34
- route?: any,
35
- title?: string,
36
- subTitle?: any,
37
- titleColor?: string,
38
- titleAlign?: any,
39
- withIcon?: boolean,
40
- icon?: any,
41
- leftImg?: any,
42
- isBackStyle?: boolean,
43
- onActionLeft?: () => void,
44
- onRightAction?: () => void,
45
- showCall?: boolean,
46
- titleStyle?: TextStyle,
47
- btnStyle?: TextStyle,
48
- style?: ViewStyle,
49
- titleWrapStyle?: ViewStyle,
50
- paddingTop?: number,
51
- isVertical?: boolean,
52
- leftImageStyle?: ImageStyle
53
- }
54
-
55
- const NavBar = (props: Props) => {
56
-
57
- const theme = useTheme();
58
-
59
- const goSupport = () => {
60
- props.navigation.navigate('Supports', {});
61
- }
62
- return (
63
- <Wrapper {...props} style={{ paddingTop: props.paddingTop, flexDirection: props.isVertical ? 'column' : 'row', alignItems: props.isVertical ? 'flex-start' : 'center', ...props.style }}>
64
- <OButton
65
- imgLeftSrc={props.leftImg || theme.images.general.arrow_left}
66
- imgRightSrc={null}
67
- style={{ ...btnBackArrow, ...props.btnStyle, ...props.isVertical ? (I18nManager.isRTL ? { paddingRight: 0 } : { paddingLeft: 0 }) : {} }}
68
- onClick={props?.onActionLeft}
69
- imgLeftStyle={{width: 20, ...props.leftImageStyle}}
70
- />
71
- <TitleTopWrapper>
72
- {props.withIcon
73
- ? (
74
- <OIcon
75
- url={props.icon}
76
- style={{
77
- borderColor: theme.colors.lightGray,
78
- borderRadius: 20,
79
- }}
80
- width={60}
81
- height={60}
82
- />
83
- )
84
- : null
85
- }
86
- <TitleWrapper style={{ paddingStart: props.isVertical ? 0 : 10, ...props.titleWrapStyle }}>
87
- <OText
88
- size={24}
89
- lineHeight={36}
90
- weight={Platform.OS === 'ios' ? '600' : 'bold'}
91
- style={
92
- {
93
- textAlign: props.titleAlign ? props.titleAlign : 'center',
94
- marginRight: props.showCall ? 0 : 40,
95
- color: props.titleColor || theme.colors.textNormal,
96
- paddingHorizontal: props.titleAlign == 'left' ? 12 : 0,
97
- ...props.titleStyle,
98
- }
99
- }
100
- >
101
- {props.title || ''}
102
- </OText>
103
- {props.subTitle
104
- ? (props.subTitle)
105
- : null
106
- }
107
- </TitleWrapper>
108
- </TitleTopWrapper>
109
- {props.showCall
110
- ? (<OButton
111
- isCircle={true}
112
- bgColor={theme.colors.primary}
113
- borderColor={theme.colors.primary}
114
- imgRightSrc={null}
115
- imgLeftStyle={{ tintColor: 'white', width: 30, height: 30 }}
116
- imgLeftSrc={theme.images.general.support}
117
- onClick={props.onRightAction || goSupport} />)
118
- : null
119
- }
120
- </Wrapper>
121
- )
122
- }
123
-
124
- NavBar.defaultProps = {
125
- title: '',
126
- textAlign: 'center'
127
- };
128
-
129
- export default NavBar;
@@ -1,50 +0,0 @@
1
- import React from 'react'
2
- import { View } from 'react-native'
3
- import { OButton, OIcon, OText } from '../shared'
4
- import { NotFoundSourceParams } from '../../types'
5
- import { useTheme } from 'styled-components/native';
6
- import {
7
- NotFound,
8
- NotFoundImage
9
- } from './styles'
10
-
11
- export const NotFoundSource = (props: NotFoundSourceParams) => {
12
- const {
13
- image,
14
- content,
15
- btnTitle,
16
- conditioned,
17
- onClickButton
18
- } = props
19
-
20
- const theme = useTheme();
21
-
22
- const errorImage = image || theme.images.general.notFound
23
-
24
- return (
25
- <NotFound>
26
- {errorImage && (
27
- <NotFoundImage>
28
- <OIcon src={errorImage} width={260} height={220} />
29
- </NotFoundImage>
30
- )}
31
- {content && conditioned && !errorImage && <OText color={theme.colors.disabled} size={18} style={{ textAlign: 'center' }}>{content}</OText>}
32
- {content && !conditioned && <OText color={theme.colors.disabled} size={18} style={{ textAlign: 'center' }}>{content}</OText>}
33
- {!onClickButton && props.children && (
34
- props.children
35
- )}
36
- {onClickButton && (
37
- <View style={{ marginTop: 10, width: '100%' }}>
38
- <OButton
39
- style={{ width: '100%', height: 50 }}
40
- bgColor={theme.colors.primary}
41
- borderColor={theme.colors.primary}
42
- onClick={() => onClickButton()}
43
- text={btnTitle}
44
- textStyle={{ color: theme.colors.white }}
45
- />
46
- </View>
47
- )}
48
- </NotFound>
49
- )
50
- }
@@ -1,16 +0,0 @@
1
- import styled from 'styled-components/native'
2
-
3
- export const NotFound = styled.View`
4
- display: flex;
5
- flex-direction: column;
6
- justify-content: center;
7
- align-items: center;
8
- width: 100%;
9
- height: auto;
10
- margin: 10px auto;
11
- padding: 10px;
12
- `
13
-
14
- export const NotFoundImage = styled.View`
15
- max-width: 300px;
16
- `
@@ -1,120 +0,0 @@
1
- import React,{ useEffect, useState } from 'react';
2
- import { SafeAreaContainer } from '../../layouts/SafeAreaContainer';
3
- import NavBar from '../NavBar';
4
- import { useLanguage, useUtils } from 'ordering-components/native';
5
- import { ItemInfo, ItemWrap, NoticScroll, PageWrapper } from './styles';
6
- import { OIcon, OText } from '../shared';
7
- import { useTheme } from 'styled-components/native';
8
- import { TouchableOpacity } from 'react-native-gesture-handler';
9
- import { _retrieveStoreData } from '../../providers/StoreUtil';
10
-
11
- const Notifications = (props: any) => {
12
- const { navigation } = props;
13
- const [, t] = useLanguage()
14
- const theme = useTheme()
15
- const [{ optimizeImage }] = useUtils();
16
- const [businessLogo, setLogo] = useState(null);
17
-
18
- const items = [
19
- {
20
- id: 'notic_id_01',
21
- content: '20% In all our dishes only from Monday to Friday',
22
- date: '2021.09.18 12:45 PM'
23
- },
24
- {
25
- id: 'notic_id_02',
26
- content: '20% In all our dishes only from Monday to Friday',
27
- date: '2021.09.18 09:45 AM'
28
- },
29
- {
30
- id: 'notic_id_03',
31
- content: '20% In all our dishes only from Monday to Friday',
32
- date: '2021.09.16 02:15 AM'
33
- },
34
- {
35
- id: 'notic_id_04',
36
- content: '20% In all our dishes only from Monday to Friday',
37
- date: '2021.09.15 11:24 AM'
38
- },
39
- {
40
- id: 'notic_id_05',
41
- content: '20% In all our dishes only from Monday to Friday',
42
- date: '2021.09.14 06:55 AM'
43
- },
44
- {
45
- id: 'notic_id_06',
46
- content: '20% In all our dishes only from Monday to Friday',
47
- date: '2021.09.15 11:24 AM'
48
- },
49
- {
50
- id: 'notic_id_07',
51
- content: '20% In all our dishes only from Monday to Friday',
52
- date: '2021.09.14 06:55 AM'
53
- },
54
- {
55
- id: 'notic_id_08',
56
- content: '20% In all our dishes only from Monday to Friday',
57
- date: '2021.09.15 11:24 AM'
58
- },
59
- {
60
- id: 'notic_id_09',
61
- content: '20% In all our dishes only from Monday to Friday',
62
- date: '2021.09.14 06:55 AM'
63
- },
64
- {
65
- id: 'notic_id_10',
66
- content: '20% In all our dishes only from Monday to Friday',
67
- date: '2021.09.15 11:24 AM'
68
- },
69
- {
70
- id: 'notic_id_11',
71
- content: '20% In all our dishes only from Monday to Friday',
72
- date: '2021.09.14 06:55 AM'
73
- },
74
- ]
75
-
76
- const callLogo = async () => {
77
- const { businessLogo } = await _retrieveStoreData('b_logo');
78
- setLogo(businessLogo)
79
- }
80
-
81
- useEffect(() => {
82
- callLogo();
83
- }, [])
84
-
85
- const renderItem = ({id, content, date}: any) => (
86
- <ItemWrap>
87
- <OIcon url={optimizeImage(businessLogo, 'h_300,c_limit')} width={63} height={63} />
88
- <ItemInfo>
89
- <OText size={12} lineHeight={18}>{content}</OText>
90
- <OText size={12} lineHeight={18} color={theme.colors.textSecondary}>{date}</OText>
91
- </ItemInfo>
92
- <TouchableOpacity style={{top: -5, paddingEnd: 4}}>
93
- <OIcon src={theme.images.general.close} width={10} />
94
- </TouchableOpacity>
95
- </ItemWrap>
96
- )
97
-
98
- return (
99
- <SafeAreaContainer>
100
- <PageWrapper>
101
- <NavBar
102
- onActionLeft={() => navigation.goBack()}
103
- btnStyle={{ paddingStart: 0 }}
104
- title={t('NOTIFICATIONS', 'Notifications')}
105
- isVertical
106
- />
107
- <NoticScroll showsVerticalScrollIndicator={false}>
108
- {items.map((item: any) =>
109
- <React.Fragment key={item.id}>
110
- {renderItem(item)}
111
- </React.Fragment>
112
- )}
113
- </NoticScroll>
114
- </PageWrapper>
115
- </SafeAreaContainer>
116
- )
117
- };
118
-
119
- export default Notifications;
120
-
@@ -1,21 +0,0 @@
1
- import styled from 'styled-components/native';
2
-
3
- export const PageWrapper = styled.View`
4
- flex: 1;
5
- padding-horizontal: 40px;
6
- `;
7
-
8
- export const ItemWrap = styled.View`
9
- border-radius: 7.6px;
10
- padding: 10px 8px;
11
- flex-direction: row;
12
- margin-bottom: 14px;
13
- `;
14
-
15
- export const ItemInfo = styled.View`
16
- flex-shrink: 1;
17
- padding-horizontal: 10px;
18
- justify-content: space-evenly;
19
- `;
20
-
21
- export const NoticScroll = styled.ScrollView``;