This commit is contained in:
Johannes
2024-02-19 16:40:33 +02:00
parent 3f2cb7717e
commit 48d9437f59
26 changed files with 47 additions and 497 deletions
+2 -20
View File
@@ -1,6 +1,6 @@
import React from "react";
import styled from "styled-components";
import { Divider, TextSection, Link } from "@components/index";
import { TextSection, Link } from "@components/index";
import colors from "@theme/colors";
import ContactCard from "@components/ContactCard";
@@ -49,26 +49,11 @@ const ContactContainer = styled.div`
}
`;
const TitleContainer = styled.div`
display: flex;
width: 100%;
align-items: center;
justify-content: center;
padding: 10px 10px;
flex-direction: column;
margin: auto;
`;
const CommitteeContainer: React.FC<{
committee: Committee;
children: React.ReactNode;
}> = ({ committee, children }) => (
<Container>
<TitleContainer>
<h2>
{committee.name_fi || committee.name_en}
</h2>
</TitleContainer>
<div>
{committee.roles.map((role) => (
role.representatives.map((representative) => (
@@ -77,7 +62,7 @@ const CommitteeContainer: React.FC<{
name={representative.name}
phone={representative.phone_number}
email={representative.email}
image={(committee.name_en === "Board") ? (representative.image || blankProfile) : null}
image={representative.image || blankProfile}
role_fi={role.name_fi}
role_en={role.name_en}
/>
@@ -118,9 +103,6 @@ const BoardPageView: React.FC = () => (
<ContactContainer>
{orderedCommittees.map((json) => (
<React.Fragment key={json.slug}>
{(json.slug !== "board") && (
<Divider />
)}
<TextSection id={json.slug}>
<CommitteeContainer committee={json}>
{(json.slug === "board") && (