import { AccordionButton, AccordionItem, AccordionPanel, Flex, Icon, } from "@chakra-ui/react"; import { useTrack } from "hooks/analytics/useTrack"; import { FaMapMarkerAlt } from "react-icons/fa"; import { FiCalendar, FiChevronDown, FiClock } from "react-icons/fi"; import { Badge, Heading, LinkButton, Text } from "tw-components"; interface EventProps { type: string; title: string; timestamp: string; location: string; description: string; link: string; isPast?: boolean; } export const DevRelEvent: React.FC = ({ type, title, timestamp, location, description, link, isPast, }) => { const trackEvent = useTrack(); return ( {type} {title} {new Date(timestamp).toLocaleDateString("en-US", { weekday: "long", year: "numeric", month: "long", day: "numeric", })} {new Date(timestamp).toLocaleTimeString("en-US", { hour: "numeric", minute: "numeric", hour12: true, })} {location} {description} trackEvent({ category: `events-${title}`, action: "click", label: "register", }) } w={60} fontSize="20px" color="black" flexShrink={0} background="white" _hover={ isPast ? {} : { background: "whiteAlpha.800", } } noIcon isExternal isDisabled={isPast} > Register ); };