diff --git a/web/pageComponents/pageTemplates/Event.tsx b/web/pageComponents/pageTemplates/Event.tsx index b2387a417..1dce1cbe5 100644 --- a/web/pageComponents/pageTemplates/Event.tsx +++ b/web/pageComponents/pageTemplates/Event.tsx @@ -4,9 +4,9 @@ import { FormattedMessage } from 'react-intl' import { getEventDates } from '../../common/helpers/dateUtilities' import ContactList from '../shared/ContactList' import TitleText from '../shared/portableText/TitleText' -import RelatedContent from '../shared/RelatedContent' import AddToCalendar from '../topicPages/AddToCalendar' import Promotion from '../topicPages/Promotion' +import RelatedContent from '../shared/RelatedContent' import type { PortableTextBlock } from '@portabletext/types' import Seo from '../../pageComponents/shared/Seo' @@ -14,7 +14,6 @@ import type { EventSchema } from '../../types/types' import { EventJsonLd } from 'next-seo' import Blocks from '../../pageComponents/shared/portableText/Blocks' - export default function Event({ data }: { data: EventSchema }): JSX.Element { const { title } = data const { location, ingress, content, promotedPeople, relatedLinks, contactList, eventDate } = data.content @@ -30,11 +29,8 @@ export default function Event({ data }: { data: EventSchema }): JSX.Element { )}
- -
+ +
{title && } {start && (
@@ -64,7 +60,7 @@ export default function Event({ data }: { data: EventSchema }): JSX.Element {
0 && ( )} diff --git a/web/pageComponents/shared/ContactList.tsx b/web/pageComponents/shared/ContactList.tsx index 53be351ed..ee88771d2 100644 --- a/web/pageComponents/shared/ContactList.tsx +++ b/web/pageComponents/shared/ContactList.tsx @@ -1,65 +1,37 @@ import { HTMLAttributes } from 'react' -import styled from 'styled-components' import type { ContactListData } from '../../types/types' import { Text, Heading } from '@components' import { removeWhiteSpace } from '../../common/helpers/removeWhiteSpace' -const Contacts = styled.div` - padding-top: var(--space-small); - display: flex; - flex-wrap: wrap; - flex-direction: row; - justify-content: space-between; -` -const Contact = styled.div` - display: flex; - padding: var(--space-small) 0; - flex-basis: 35%; - justify-content: left; - flex-direction: column; -` -const Phone = styled.a` - margin: var(--space-xSmall) 0; - color: var(--grey-70); - font-size: var(--typeScale-0); - &:hover { - color: var(--moss-green-100); - } -` - -const Location = styled.p` - margin: var(--space-xSmall) 0; - font-size: var(--typeScale-1); -` -const Header = styled(Heading)` - text-align: var(--contactList-titleAlign, left); - margin: var(--contactList-titleMargin, 0 0 var(--space-xLarge) 0); -` - type ContactListProps = { data: ContactListData } & HTMLAttributes const ContactList = ({ data }: ContactListProps) => { return ( -
+
{data?.title && ( -
+ {data.title} -
+ )} {data?.ingress && {data.ingress}} {data?.contacts && data?.contacts.length > 0 && ( - +
{data.contacts.map((contact) => { return ( - - {contact.location} - {contact.phone} - +
+

{contact.location}

+ + {contact.phone} + +
) })} - +
)}
) diff --git a/web/pageComponents/shared/RelatedContent.tsx b/web/pageComponents/shared/RelatedContent.tsx index 5d57c0597..3940ac39a 100644 --- a/web/pageComponents/shared/RelatedContent.tsx +++ b/web/pageComponents/shared/RelatedContent.tsx @@ -1,14 +1,8 @@ import { Fragment, HTMLAttributes } from 'react' import { Heading, List } from '@components' import type { RelatedLinksData, LinkData } from '../../types/types' -import styled from 'styled-components' import ReadMoreLink from '../shared/ReadMoreLink' -const StyledHeading = styled(Heading)` - margin: var(--related-titleMargin, 0 0 var(--space-xLarge) 0); - text-align: var(--related-titleAlign, left); -` - const { Item } = List type RelatedContentProps = { @@ -18,9 +12,9 @@ type RelatedContentProps = { const RelatedContent = ({ data, ...rest }: RelatedContentProps) => { return (