@vixoniccom/footbal-score 1.4.6-dev.8 → 1.4.6-dev.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/build.zip CHANGED
Binary file
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vixoniccom/footbal-score",
3
3
  "alias": "Resultados Deportivos",
4
- "version": "1.4.6-dev.8",
4
+ "version": "1.4.6-dev.9",
5
5
  "description": "Muestra resultados en vivo de fútbol.",
6
6
  "main": "main.js",
7
7
  "author": "",
@@ -72,7 +72,7 @@ export const Row: React.FunctionComponent<Props> = ({ item, parameters }) => {
72
72
  justifyContent: 'center'
73
73
  }}>
74
74
  <div style={{ display: 'flex', justifyContent: 'flex-end' }}>
75
- <Time time={moment.parseZone(fixture.date).unix()} parameters={parameters} />
75
+ <Time time={moment.parseZone(fixture.date).unix()} utcOffset={moment.parseZone(fixture.date).utcOffset()} parameters={parameters} />
76
76
  </div>
77
77
  <div style={{ display: 'flex', justifyContent: 'flex-end' }}>
78
78
  <Status status={fixture.status.short} parameters={parameters} />
@@ -1,22 +1,18 @@
1
1
  import moment from 'moment'
2
2
  import React from 'react'
3
3
  import { FormattedText } from '../../'
4
- import { resolvedTimezone } from '../../../helpers/getFixture'
5
4
 
6
5
  interface Props {
7
6
  time: number
7
+ utcOffset: number
8
8
  parameters: VixonicParameters
9
9
  }
10
10
 
11
- const MEXICO_TIMEZONES = ['America/Mexico_City', 'America/Cancun', 'America/Merida', 'America/Monterrey', 'America/Matamoros', 'America/Chihuahua', 'America/Ojinaga', 'America/Mazatlan', 'America/Hermosillo', 'America/Tijuana', 'America/Ensenada']
12
- const offset = MEXICO_TIMEZONES.includes(resolvedTimezone) ? -3600 : 0
13
-
14
- export const Time: React.FunctionComponent<Props> = ({ time, parameters }) => {
15
- const adjusted = time + offset
11
+ export const Time: React.FunctionComponent<Props> = ({ time, utcOffset, parameters }) => {
16
12
  return (
17
13
  <div style={{ display: 'flex', flexDirection: 'column', alignItems: 'center', justifyContent: 'center' }}>
18
- <FormattedText text={moment.unix(adjusted).format('DD-MM')} format={parameters.timeFormat} />
19
- <FormattedText text={moment.unix(adjusted).format('h:mm a')} format={parameters.timeFormat} />
14
+ <FormattedText text={moment.unix(time).utcOffset(utcOffset).format('DD-MM')} format={parameters.timeFormat} />
15
+ <FormattedText text={moment.unix(time).utcOffset(utcOffset).format('h:mm a')} format={parameters.timeFormat} />
20
16
  </div>
21
17
  )
22
18
  }