import React, { ReactNode } from "react"; // import { Button } from "./Button"; import { Image } from "./Image"; import { EventSetting } from "./EventSetting"; import styles from "./EventDescriptionCard.module.css"; interface BaseProps { name: string; date: Date; poster: string; registerLink?: string; children: ReactNode; } type Props = BaseProps & ( | { online: true; location: keyof typeof links } | { online: false; location: string } ); const links = { Twitch: "https://www.twitch.tv/uwcsclub", Discord: "https://discord.gg/pHfYBCg", Facebook: "https://www.facebook.com/uw.computerscienceclub", Instagram: "https://www.instagram.com/uwcsclub/", }; /** * @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(props: Props) { return (
{props.name}

{props.name}

{props.children}
); }