From e46a10595cb7649b03311560358400819259cb48 Mon Sep 17 00:00:00 2001 From: banthungprong <59219161+banthungprong@users.noreply.github.com> Date: Wed, 2 Nov 2022 07:42:22 +0100 Subject: [PATCH] fixed switched start/end time, changed length to duration --- web/src/routes/Events.jsx | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/web/src/routes/Events.jsx b/web/src/routes/Events.jsx index c5517406f..e19941653 100644 --- a/web/src/routes/Events.jsx +++ b/web/src/routes/Events.jsx @@ -22,11 +22,7 @@ import CalendarIcon from '../icons/Calendar'; import Calendar from '../components/Calendar'; import Button from '../components/Button'; import Dialog from '../components/Dialog'; -import { - fromUnixTime, - intervalToDuration, - formatDuration, -} from 'date-fns'; +import { fromUnixTime, intervalToDuration, formatDuration } from 'date-fns'; const API_LIMIT = 25; @@ -42,7 +38,7 @@ const monthsAgo = (num) => { return new Date(date.getFullYear(), date.getMonth(), date.getDate()).getTime() / 1000; }; -const clipLength = (start_time, end_time) => { +const clipDuration = (start_time, end_time) => { const start = fromUnixTime(start_time); const end = fromUnixTime(end_time); let duration = 'In Progress'; @@ -474,7 +470,7 @@ export default function Events({ path, ...props }) {