Newer
Older
import Image from "next/image";
import { Avatar, Button, Card, Text, useMantineTheme } from "@mantine/core";
import { getAccentColor } from "../utilities/colors";
export default function BoardMemberCard({ entry }) {
const theme = useMantineTheme();
const { locale, push } = useRouter();
const sendMail = (address) => {
push("mailto:" + address);
};
radius="md"
withBorder
p="lg"
style={{
display: "flex",
flexDirection: "column",
justifyContent: "space-between",
flexGrow: 1,
}}
shadow="sm"
>
<div>
<div
style={{
width: "120px",
height: "120px",
borderRadius: "1rem",
margin: "auto",
overflow: "hidden",
}}
>
<Image
src={entry.image}
width={0}
height={0}
sizes="100vw"
style={{ width: "30rem", maxWidth: "100%", height: "auto" }}
alt={entry.name}
/>
</div>
<Text ta="center" fz="lg" weight={500} mt="md">
{entry.name}
</Text>
<Text ta="center" c="dimmed" fz="sm">
{entry.mail ? entry.mail.replace("@", " [ät] ") + " • " : ""}
{entry.role[locale || "en"]}
<Button
leftIcon={<Icon icon={ICONS.EMAIL} color={getAccentColor(theme)} />}
variant="default"
fullWidth
mt="md"
onClick={() => sendMail(entry.mail)}
>
Send message
</Button>