ordering-ui-react-native 0.12.8 → 0.12.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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ordering-ui-react-native",
3
- "version": "0.12.8",
3
+ "version": "0.12.9",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -19,8 +19,8 @@ export const PromotionCard = (props: any) => {
19
19
  onPromotionClick,
20
20
  } = props
21
21
 
22
- const [theme] = useTheme();
23
- const [{ optimizeImage }] = useUtils();
22
+ const theme = useTheme();
23
+ const [{ optimizeImage, parseDate }] = useUtils();
24
24
 
25
25
  return (
26
26
  <>
@@ -75,6 +75,14 @@ export const PromotionCard = (props: any) => {
75
75
  {promotion?.description}
76
76
  </OText>
77
77
  )}
78
+ <OText
79
+ size={16}
80
+ numberOfLines={1}
81
+ ellipsizeMode='tail'
82
+ style={styles.textStyle}
83
+ >
84
+ {`Expires ${parseDate(promotion?.end)}`}
85
+ </OText>
78
86
  </>
79
87
  )}
80
88
  </WrapContent>
@@ -12,7 +12,7 @@ const PromotionsUI = (props: any) => {
12
12
  const { offersState, loadMoreOffers } = props
13
13
 
14
14
  const [, t] = useLanguage();
15
- const [theme] = useTheme();
15
+ const theme = useTheme();
16
16
  const { height } = useWindowDimensions();
17
17
 
18
18
  return (