import React from "react"; import { Button } from "./Button"; import { Image } from "./Image"; import { EventSetting } from "./EventSetting"; import styles from "./EventDescriptionCard.module.css"; import { Discord, Twitch, Instagram, Facebook } from "./SocialLinks"; interface Props { name: string; short: string; online: boolean; location: string; date: Date; poster?: string; registerLink?: string; } /** * @remarks * - Child elements will display as the event's description * - Assuming date prop is in EST * - poster is the event's image name, including file ending (.jpg/.png/etc) * - If event is online, location will be the platform, with capital first letter and no trailing spaces * - ie. location="Discord" * @todo * get Link component */ export function EventDescriptionCard({ location, poster, name, short, date, online, registerLink, }: Props) { const Icon = getIcon(location); return (
{poster && {name}}

{name}

{short}

); } function getIcon(platform: string) { switch (platform) { case "Twitch": return Twitch; case "Discord": return Discord; case "Instagram": return Instagram; case "Facebook": return Facebook; default: return null; } }