tf-checkout-react 1.3.10 → 1.3.11

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,5 +1,5 @@
1
1
  {
2
- "version": "1.3.10",
2
+ "version": "1.3.11",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
@@ -143,7 +143,8 @@ const LogicRunner: FC<{
143
143
  }))
144
144
  setStates(mappedStates)
145
145
  if (prevCountry.current !== values.country) {
146
- setFieldValue('state', mappedStates[0]?.value ?? '')
146
+ const stateExists = mappedStates.find(state => state.value === values.state)?.value
147
+ setFieldValue('state', stateExists ?? (mappedStates[0]?.value ?? ''))
147
148
  prevCountry.current = values.country
148
149
  }
149
150
  onGetStatesSuccess(res.data)
@@ -1,3 +1,4 @@
1
+ import moment from 'moment-timezone'
1
2
  import React from 'react'
2
3
 
3
4
  interface EventInfoTypes {
@@ -20,7 +21,11 @@ const tableConfig = (key?: string) => {
20
21
  header: ['Order No.', 'Date', 'Event', 'Total'],
21
22
  body: [
22
23
  (row: any) => row.id,
23
- (row: any) => row.date,
24
+ (row: any) => row.timezone
25
+ ? moment
26
+ .tz(row.date, row.timezone)
27
+ .format('DD MMMM YYYY')
28
+ : row.date,
24
29
  (row: any) => (
25
30
  <EventInfoItem image={row.image} name={row.eventName} />
26
31
  ),