From 50ab384344dfd1474c1ff48c463d97a5f47798dd Mon Sep 17 00:00:00 2001 From: Bernt Christian Egeland Date: Sun, 29 Aug 2021 17:50:13 +0200 Subject: [PATCH] added button groups --- web/src/routes/Event.jsx | 85 +++++++++++++++++++++++----------------- 1 file changed, 48 insertions(+), 37 deletions(-) diff --git a/web/src/routes/Event.jsx b/web/src/routes/Event.jsx index dcc03afb9..d69a882e0 100644 --- a/web/src/routes/Event.jsx +++ b/web/src/routes/Event.jsx @@ -4,6 +4,7 @@ import Link from '../components/Link'; import ActivityIndicator from '../components/ActivityIndicator'; import Button from '../components/Button'; import ArrowDown from '../icons/ArrowDropdown'; +import ArrowDropup from '../icons/ArrowDropup'; import Clip from '../icons/Clip'; import Close from '../icons/Close'; import Delete from '../icons/Delete'; @@ -14,6 +15,38 @@ import VideoPlayer from '../components/VideoPlayer'; import { Table, Thead, Tbody, Th, Tr, Td } from '../components/Table'; import { FetchStatus, useApiHost, useEvent, useDelete } from '../api'; +const ActionButtonGroup = ({ className, handleClickDelete, close }) => ( +
+ + +
+); + +const DownloadButtonGroup = ({ className, apiHost, eventId }) => ( + + + + +); + export default function Event({ eventId, close, scrollRef }) { const apiHost = useApiHost(); const { data, status } = useEvent(eventId); @@ -65,50 +98,28 @@ export default function Event({ eventId, close, scrollRef }) { return ; } - const DownloadButtonGroup = ({ className }) => ( - - - - - ); - const DeleteButtonGroup = ({ className }) => ( -
- - -
- ); const startime = new Date(data.start_time * 1000); const endtime = new Date(data.end_time * 1000); return (
- - +
- + {showDialog ? (
- - + +
);