diff options
Diffstat (limited to 'frontend/src/components/record.js')
| -rw-r--r-- | frontend/src/components/record.js | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/frontend/src/components/record.js b/frontend/src/components/record.js index a01109c..80e084d 100644 --- a/frontend/src/components/record.js +++ b/frontend/src/components/record.js | |||
| @@ -8,16 +8,15 @@ export default function Record({ name, place, portals, time, date }) { | |||
| 8 | const [record, setRecord] = useState(null); | 8 | const [record, setRecord] = useState(null); |
| 9 | const location = useLocation(); | 9 | const location = useLocation(); |
| 10 | 10 | ||
| 11 | useEffect(() => { | 11 | // useEffect(() => { |
| 12 | console.log(name, place, portals, time, date); | 12 | // console.log(name, place, portals, time, date); |
| 13 | }) | 13 | // }) |
| 14 | 14 | ||
| 15 | function timeSince() { | 15 | function timeSince() { |
| 16 | const now = new Date(); | 16 | const now = new Date(); |
| 17 | const dateNew = new Date(date); | 17 | const dateNew = new Date(date); |
| 18 | 18 | ||
| 19 | const secondsPast = Math.floor((now - dateNew) / 1000); | 19 | const secondsPast = Math.floor((now - dateNew) / 1000); |
| 20 | console.log('Seconds past:', secondsPast); | ||
| 21 | 20 | ||
| 22 | if (secondsPast < 60) { | 21 | if (secondsPast < 60) { |
| 23 | return `${secondsPast} seconds ago`; | 22 | return `${secondsPast} seconds ago`; |