From a7d647af1755ebac582cba27cd1ab4c3aed7fbcc Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Tue, 16 Feb 2021 13:09:58 -0800 Subject: [PATCH] Minor refactor --- .../webapp/src/components/maps-page/maps-list/index.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/webapp/src/components/maps-page/maps-list/index.tsx b/packages/webapp/src/components/maps-page/maps-list/index.tsx index 59e9d462..5f85d1c7 100644 --- a/packages/webapp/src/components/maps-page/maps-list/index.tsx +++ b/packages/webapp/src/components/maps-page/maps-list/index.tsx @@ -34,6 +34,10 @@ import MoreHorizIcon from '@material-ui/icons/MoreHoriz'; import StarRateRoundedIcon from '@material-ui/icons/StarRateRounded'; import SearchIcon from '@material-ui/icons/Search'; +// Load fromNow pluggin +const relativeTime = require('dayjs/plugin/relativeTime') +dayjs.extend(relativeTime); + function descendingComparator(a: T, b: T, orderBy: keyof T) { 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; return (