feat: remove all instances of moment usage
This commit is contained in:
parent
7d6fb17158
commit
973040f409
29 changed files with 252 additions and 193 deletions
|
|
@ -1,7 +1,7 @@
|
|||
import { useQuery } from '@apollo/react-hooks'
|
||||
import { makeStyles } from '@material-ui/core'
|
||||
import { formatDistanceToNow } from 'date-fns'
|
||||
import gql from 'graphql-tag'
|
||||
import moment from 'moment'
|
||||
import * as R from 'ramda'
|
||||
import React from 'react'
|
||||
import { useHistory, useLocation } from 'react-router-dom'
|
||||
|
|
@ -89,7 +89,10 @@ const MachineStatus = () => {
|
|||
width: 200,
|
||||
size: 'sm',
|
||||
textAlign: 'left',
|
||||
view: m => (m.lastPing ? moment(m.lastPing).fromNow() : 'unknown')
|
||||
view: m =>
|
||||
m.lastPing
|
||||
? formatDistanceToNow(new Date(m.lastPing), { addSuffix: true })
|
||||
: 'unknown'
|
||||
},
|
||||
{
|
||||
header: 'Software Version',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue