Display ? if laser use is unknown

This commit is contained in:
Tanner Collin 2020-08-19 23:44:26 +00:00
parent 67b01629aa
commit bc81358c5a

View File

@ -150,7 +150,7 @@ export function Home(props) {
const mcPlayers = stats && stats['minecraft_players'] ? stats['minecraft_players'] : []; const mcPlayers = stats && stats['minecraft_players'] ? stats['minecraft_players'] : [];
const getTrackStat = (x) => stats && stats.track && stats.track[x] && moment().unix() - stats.track[x] > 60 ? 'Free' : 'In Use'; const getTrackStat = (x) => stats && stats.track && stats.track[x] ? moment().unix() - stats.track[x] > 60 ? 'Free' : 'In Use' : '?';
const getTrackLast = (x) => stats && stats.track && stats.track[x] ? moment.unix(stats.track[x]).tz('America/Edmonton').format('llll') : 'Unknown'; const getTrackLast = (x) => stats && stats.track && stats.track[x] ? moment.unix(stats.track[x]).tz('America/Edmonton').format('llll') : 'Unknown';
const getTrackAgo = (x) => stats && stats.track && stats.track[x] ? moment.unix(stats.track[x]).tz('America/Edmonton').fromNow() : ''; const getTrackAgo = (x) => stats && stats.track && stats.track[x] ? moment.unix(stats.track[x]).tz('America/Edmonton').fromNow() : '';