feat: remove all instances of moment usage

This commit is contained in:
Sérgio Salgado 2021-11-23 16:09:15 +00:00
parent 7d6fb17158
commit 973040f409
29 changed files with 252 additions and 193 deletions

View file

@ -1,5 +1,5 @@
import { makeStyles } from '@material-ui/core/styles'
import moment from 'moment'
import { format } from 'date-fns'
import * as R from 'ramda'
import React from 'react'
@ -7,7 +7,6 @@ import { MainStatus } from 'src/components/Status'
import DataTable from 'src/components/tables/DataTable'
import { ReactComponent as TxInIcon } from 'src/styling/icons/direction/cash-in.svg'
import { ReactComponent as TxOutIcon } from 'src/styling/icons/direction/cash-out.svg'
import { ifNotNull } from 'src/utils/nullCheck'
import styles from './CustomersList.styles'
import { getAuthorizedStatus, getFormattedPhone, getName } from './helper'
@ -45,7 +44,7 @@ const CustomersList = ({ data, locale, onClick, loading }) => {
header: 'Last active',
width: 137,
view: it =>
ifNotNull(it.lastActive, moment.utc(it.lastActive).format('YYYY-MM-D'))
(it.lastActive && format(new Date(it.lastActive), 'yyyy-MM-d')) ?? ''
},
{
header: 'Last transaction',