added location, start time and end time for event render with epic style boi

This commit is contained in:
Toni L
2021-03-30 17:59:34 +03:00
parent 5c5ac30fea
commit 279cd2a594
+15
View File
@@ -24,6 +24,14 @@ const StyledTextSection = styled(TextSection)`
color: ${colors.orange1};
}
}
time {
p {
font-size: 0.9rem;
font-weight: bold;
line-height: 0.4rem;
}
}
`;
const SignupButtons = styled.div`
@@ -38,6 +46,8 @@ const Content = styled(MarkdownStyles)`
const EventPageView: React.FC<EventPageViewProps> = ({ event }) => {
if (!event) return <LoadingView />;
const date_start = new Date(event.start_time).toLocaleString("fi-FI");
const date_end = new Date(event.end_time).toLocaleString("fi-FI");
return (
<StyledTextSection>
<h1>
@@ -55,6 +65,11 @@ const EventPageView: React.FC<EventPageViewProps> = ({ event }) => {
</h1>
<div>
<Content source={event.content_fi} escapeHtml={false} />
<time>
<p>Paikka: {event.location_fi}</p>
<p>Alkaa: {date_start}</p>
<p>Päättyy: {date_end}</p>
</time>
{/* We may have multiple signup forms. Generate own Button for each one */}
<SignupButtons>
{event.signupForm.map((sf) => (