|
|
|
@ -7,7 +7,7 @@ import { Link } from "./Link"; |
|
|
|
|
|
|
|
|
|
import styles from "./EventCard.module.css"; |
|
|
|
|
|
|
|
|
|
interface BaseProps { |
|
|
|
|
interface EventCardProps { |
|
|
|
|
name: string; |
|
|
|
|
short: string; |
|
|
|
|
date: Date; |
|
|
|
@ -15,15 +15,13 @@ interface BaseProps { |
|
|
|
|
location: string; |
|
|
|
|
poster?: string; |
|
|
|
|
registerLink?: string; |
|
|
|
|
permaLink: string; |
|
|
|
|
showDescription?: boolean; |
|
|
|
|
children: ReactNode; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
type EventCardProps = |
|
|
|
|
| (BaseProps & { showDescription?: false; link: string }) |
|
|
|
|
| (BaseProps & { showDescription: true; link?: string }); |
|
|
|
|
|
|
|
|
|
export function EventCard({ |
|
|
|
|
link, |
|
|
|
|
permaLink, |
|
|
|
|
name, |
|
|
|
|
date, |
|
|
|
|
online, |
|
|
|
@ -60,8 +58,8 @@ export function EventCard({ |
|
|
|
|
<h2> |
|
|
|
|
<EventSetting date={date} online={online} location={location} /> |
|
|
|
|
</h2> |
|
|
|
|
{!showDescription && link && ( |
|
|
|
|
<Link href={link}> |
|
|
|
|
{!showDescription && ( |
|
|
|
|
<Link href={permaLink}> |
|
|
|
|
<span className={styles.mobileLearnMore}>Learn more</span> |
|
|
|
|
</Link> |
|
|
|
|
)} |
|
|
|
|