Minor refactor

This commit is contained in:
Paulo Gustavo Veiga 2021-02-16 13:09:58 -08:00
parent ea80fc5315
commit beeabc325c

View File

@ -34,6 +34,10 @@ import MoreHorizIcon from '@material-ui/icons/MoreHoriz';
import StarRateRoundedIcon from '@material-ui/icons/StarRateRounded'; import StarRateRoundedIcon from '@material-ui/icons/StarRateRounded';
import SearchIcon from '@material-ui/icons/Search'; import SearchIcon from '@material-ui/icons/Search';
// Load fromNow pluggin
const relativeTime = require('dayjs/plugin/relativeTime')
dayjs.extend(relativeTime);
function descendingComparator<T>(a: T, b: T, orderBy: keyof T) { function descendingComparator<T>(a: T, b: T, orderBy: keyof T) {
if (b[orderBy] < a[orderBy]) { if (b[orderBy] < a[orderBy]) {
@ -331,9 +335,6 @@ export const MapsList = (props: MapsListProps) => {
}); });
} }
const relativeTime = require('dayjs/plugin/relativeTime')
dayjs.extend(relativeTime);
const isSelected = (id: number) => selected.indexOf(id) !== -1; const isSelected = (id: number) => selected.indexOf(id) !== -1;
return ( return (
<div className={classes.root}> <div className={classes.root}>