import React from "react"; import styled from "styled-components"; import { Divider, TextSection, Link } from "@components/index"; import colors from "@theme/colors"; import ContactCard from "@components/ContactCard"; import FtmkJson from "./ftmk.json"; import HtmkJson from "./htmk.json"; import HvtmkJson from "./hvtmk.json"; import MtmkJson from "./mtmk.json"; import OptmkJson from "./optmk.json"; import NtmkJson from "./ntmk.json"; import PtmkJson from "./ptmk.json"; import TtmkJson from "./ttmk.json"; import YtmkJson from "./ytmk.json"; import SwtmkJson from "./swtmk.json"; import VtmkJson from "./vtmk.json"; import LtmkJson from "./ltmk.json"; import Others from "./others.json"; const orderedCommittees = [ FtmkJson, HtmkJson, LtmkJson, HvtmkJson, MtmkJson, OptmkJson, YtmkJson, TtmkJson, PtmkJson, VtmkJson, SwtmkJson, NtmkJson, Others, ]; const BlueLink = styled(Link)` color: ${colors.blue1}; &:hover { color: ${colors.lightBlue}; } `; const IndexUL = styled.ul` padding: 0; list-style: none; li::before { content: attr(data-icon); margin-right: 4px; } `; const Index: React.FC<{ committees: typeof orderedCommittees }> = ({ committees }) => ( {committees.map(({ slug, name_fi }) => (
  • {name_fi}
  • ))}
    ); const Container = styled.div` color: ${colors.darkBlue}; align-items: center; justify-content: center; width: 50vw; & > h2 { text-transform: uppercase; font-size: 4rem; width: 100%; } & > div { display: flex; flex-flow: row wrap; } @media (max-width: 950px) { width: 100vw; } `; const ContactContainer = styled.div` overflow-x: hidden; @media (max-width: 950px) { margin-top: 0; } `; 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 }) => (

    {committee.name_fi || committee.name_en}

    {committee.info}

    {committee.roles.map((role) => ( role.representatives.map((representative) => ( )) ))}
    {children}
    ); interface Committee { name_fi: string; name_en: string; info: string; roles: Array; } interface Role { name_fi: string; name_en: string; representatives: Array } interface Representative { name: string; phone_number?: string; email?: string; image?: string; } const CommitteePageView: React.FC = () => ( <>

    Toimihenkilöt

    Tältä sivulta löytyvät killan toimihenkilöt sekä lyhyet kuvaukset toimikunnista.

    Toimihenkilöiden sähköpostiosoitteet ovat muotoa etunimi.sukunimi@sahkoinsinoorikilta.fi.

    {orderedCommittees.map((json) => ( {(json.slug !== "board") && ( )} {(json.slug === "board") && (

    {"Koko hallitukseen saa yhteyden lähettämällä sähköpostia osoitteeseen "} hallitus@sahkoinsinoorikilta.fi .

    {"Hallitukselle voi myös lähettää palautetta täyttämällä "} palautelomakkeen . Lomakkeen vastauksia käydään läpi hallituksen kokouksissa.

    Toimihenkilöiden sähköpostiosoitteet ovat muotoa etunimi.sukunimi@sahkoinsinoorikilta.fi.

    )}
    ))}
    ); export default CommitteePageView;