From 175d8449eafb10cb65b64da85c5f88a856439b91 Mon Sep 17 00:00:00 2001 From: James Ketrenos Date: Sun, 10 Apr 2022 15:36:34 -0700 Subject: [PATCH] Add more info to event Signed-off-by: James Ketrenos --- client/src/Event.css | 8 ++++++++ client/src/Event.js | 13 ++++++++++--- client/src/Group.js | 4 ++++ server/event-data.js | 2 ++ 4 files changed, 24 insertions(+), 3 deletions(-) diff --git a/client/src/Event.css b/client/src/Event.css index ef38beb..9edd88f 100644 --- a/client/src/Event.css +++ b/client/src/Event.css @@ -2,3 +2,11 @@ text-align: left; } +.Event .when { + margin-bottom: 0.25rem; +} + +.Event .what { + font-size: 1.25rem; + margin-bottom: 0.5rem; +} \ No newline at end of file diff --git a/client/src/Event.js b/client/src/Event.js index 6a7e623..0968dc3 100644 --- a/client/src/Event.js +++ b/client/src/Event.js @@ -1,7 +1,7 @@ import React, { useState, useEffect, useContext } from "react"; import Paper from '@mui/material/Paper'; import MomentUtils from '@date-io/moment' -import { Calendar, MuiPickersUtilsProvider, ClockView } from '@material-ui/pickers'; +import { Calendar, MuiPickersUtilsProvider } from '@material-ui/pickers'; import Moment from 'react-moment'; import moment from 'moment'; @@ -92,10 +92,17 @@ function Event({ groupId }) {
-
{event.description}
-
+
{event.description}
+
Next event is occurring on .
+ { event.votingBegins === 'day-of' && +
Voting for location begins the day of the event.
+ } + { event.votingBegins !== 'day-of' && +
Vote any time for the location.
+ } +
Voting for location closes at {event.votingCloses}.
; diff --git a/client/src/Group.js b/client/src/Group.js index 142a2be..54ff70e 100644 --- a/client/src/Group.js +++ b/client/src/Group.js @@ -106,6 +106,10 @@ function Group() { effect(); }, [user, setGroup, groupId, csrfToken, setError]); + if (!group) { + return <>; + } + return (