All files / app/features/team Team.tsx

0% Statements 0/25
0% Branches 0/10
0% Functions 0/7
0% Lines 0/20

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134                                                                                                                                                                                                                                                                           
import {
  Avatar as MuiAvatar,
  Card,
  CardContent,
  Container,
  Grid,
  styled,
  Typography,
} from "@mui/material";
import Button from "components/Button";
import HtmlMeta from "components/HtmlMeta";
import { EmailIcon, GlobeIcon, LinkedInIcon, PinIcon } from "components/Icons";
import IconText from "components/IconText";
import PageTitle from "components/PageTitle";
import StyledLink from "components/StyledLink";
import { useTranslation } from "i18n";
import { GLOBAL } from "i18n/namespaces";
import Link from "next/link";
import { volunteerRoute } from "routes";
 
import TeamData from "./team.json";
 
const SpacerDiv = styled("div")(({ theme }) => ({
  height: theme.spacing(4),
}));
 
const TeamMemberCard = styled(Card)(({ theme }) => ({
  height: "100%",
}));
 
const TeamMembedCardContent = styled(CardContent)(({ theme }) => ({
  display: "flex",
}));
 
const DetailDiv = styled("div")(({ theme }) => ({
  padding: theme.spacing(1, 2),
  flex: "1 1 0%",
}));
 
const StyledAvatar = styled(MuiAvatar)(({ theme }) => ({
  width: theme.typography.pxToRem(96),
  height: theme.typography.pxToRem(96),
}));
 
export default function Team() {
  const { t } = useTranslation([GLOBAL]);
 
  return (
    <>
      <HtmlMeta title="The Team" />
      <Container maxWidth="md">
        <PageTitle>{t("team.title")}</PageTitle>
        <Typography paragraph>{t("team.description")}</Typography>
        <Typography paragraph>
          <Link href={volunteerRoute} passHref legacyBehavior>
            <Button variant="contained" color="secondary">
              {t("team.join_the_team")}
            </Button>
          </Link>
        </Typography>
      </Container>
      <SpacerDiv />
      <section>
        <Grid
          container
          maxWidth="xl"
          spacing={2}
          justifyContent="center"
          alignItems="stretch"
        >
          {TeamData.map(
            ({ name, director, board_position, role, location, img, link }) => (
              <Grid key={name} item xs={12} md={6} lg={4}>
                <TeamMemberCard elevation={director ? 3 : 1}>
                  <TeamMembedCardContent>
                    <StyledAvatar alt={`Headshot of ${name}`} src={img} />
                    <DetailDiv>
                      <Typography
                        variant={director ? "h1" : "h2"}
                        component="h2"
                      >
                        {name}
                      </Typography>
                      {director && (
                        <Typography variant="h2" component="h3">
                          {board_position}
                        </Typography>
                      )}
                      <Typography variant="h3">{role}</Typography>
                      <IconText icon={PinIcon} text={location} />
                      {link && (
                        <IconText
                          icon={
                            link.type === "linkedin"
                              ? LinkedInIcon
                              : link.type === "email"
                                ? EmailIcon
                                : GlobeIcon
                          }
                          text={
                            <Typography variant="body1">
                              <StyledLink href={link.url}>
                                {link.text}
                              </StyledLink>
                            </Typography>
                          }
                        />
                      )}
                    </DetailDiv>
                  </TeamMembedCardContent>
                </TeamMemberCard>
              </Grid>
            ),
          )}
        </Grid>
      </section>
      <SpacerDiv />
      <Container maxWidth="md">
        <Typography variant="h2" component="h2">
          {t("team.have_skills_contribute")}
        </Typography>
        <Typography paragraph>{t("team.fill_form_description")}</Typography>
        <Typography paragraph>
          <Link href={volunteerRoute} passHref legacyBehavior>
            <Button variant="contained" color="secondary">
              {t("team.join_our_team")}
            </Button>
          </Link>
        </Typography>
      </Container>
    </>
  );
}