import * as React from "react"; import { Card as MuiCard, CardActions, Grid, Link, Theme } from "@mui/material"; import CardContent from "@mui/material/CardContent"; import CardMedia from "@mui/material/CardMedia"; import Typography from "@mui/material/Typography"; import { CardActionArea } from "@mui/material"; import Truncate from "../../atoms/Truncate"; import { EventEvent, HideType } from "../../../../types/types"; import { Box, SxProps } from "@mui/system"; import Time from "../../atoms/Time"; import { // getEventStartMonthDayString, // getEventStartEndTimes, getEventTime, } from "../../../helpers/displayEvent"; import AddCal from "../AddCal/AddCal"; import { isNotHidden } from "../../../helpers/common"; import EventTitle from "../../atoms/EventTitle"; // import EventDateTime from "../../atoms/EventDateTime"; // import EventLocation from "../../atoms/EventLocation"; // import Tags from "../Tags"; interface Props { dateFormat: string; timeFormat: string; title: string; description?: string; image: string; photoCrop?: string; link: string; hidedescription?: HideType; hideimages?: HideType; truncatedescription: string; tags: string[]; locationName: string; sx?: SxProps | undefined; itemClass?: string; event: EventEvent; hideaddcal?: HideType; } export default function ModernCompactInner(props: Props) { const { title, description, image, photoCrop, link, hidedescription, hideimages, truncatedescription, // tags, itemClass, hideaddcal, event, } = props; const photo = photoCrop ? image.replace("/huge/", `/${photoCrop}/`) : image; const handleImageError = (e: React.SyntheticEvent) => { e.currentTarget.src = "https://brand.cornell.edu/assets/images/logos/cornell-insignia-red.svg"; }; const eventTime = getEventTime(event); return ( {isNotHidden(hideimages) ? ( ) : ( "" )} {/* {!tags.length ? ( "" ) : ( )} */} {isNotHidden(hideaddcal) ? ( ) : ( "" )} ); }