From df2da81dfde870fe202e1c2cf48987bb593cc33e Mon Sep 17 00:00:00 2001 From: Linna Luo Date: Tue, 11 May 2021 23:35:30 -0400 Subject: [PATCH] addresed MR comments --- components/MiniEventCard.tsx | 54 +++++++++++++++++------------------- 1 file changed, 25 insertions(+), 29 deletions(-) diff --git a/components/MiniEventCard.tsx b/components/MiniEventCard.tsx index 3c3f870b..78408421 100644 --- a/components/MiniEventCard.tsx +++ b/components/MiniEventCard.tsx @@ -1,37 +1,35 @@ -import React, { ReactElement } from "react"; +import React, { ReactNode } from "react"; import styles from "./MiniEventCard.module.css"; -interface EventProps { - title: string; +interface Props { + name: string; descriptionShort: string; - descriptionLong: ReactElement; + description: ReactNode; location: string; date: string; time: string; } -const DropDownIcon = () => { - return ( - - - - ); -}; +const DropDownIcon = ( + + + +); -export const MiniEventCard: React.FC = ({ - title, +export const MiniEventCard: React.FC = ({ + name, descriptionShort, - descriptionLong, + description, location, date, time, @@ -40,19 +38,17 @@ export const MiniEventCard: React.FC = ({
event.preventDefault()}> -

{title}

+

{name}

{location} | {date} | {time}

{descriptionShort}

-

- View details -

+

View details {DropDownIcon}

-

{descriptionLong}

+
{description}
); };