fix(1168): date creation fix (#376)

keep-around/af30b88d367751c9e05a735e4a0467a96238ef47
Mirlan 5 years ago committed by GitHub
parent f9e175039f
commit 4607f05464
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      src/features/Matches/helpers/prepareMatches.tsx

@ -1,5 +1,6 @@
import map from 'lodash/map'
import parse from 'date-fns/parse'
import format from 'date-fns/format'
import type { Match } from 'requests'
@ -22,7 +23,11 @@ const prepareMatch = (match: Match) => {
team2,
tournament,
} = match
const date = new Date(matchDate)
const date = parse(
matchDate,
'yyyy-MM-dd HH:mm:ssx',
new Date(),
)
return {
access: getMatchAccess(match),
calc,

Loading…
Cancel
Save