import * as React from 'react'; import Avatar from '@mui/material/Avatar'; import Box from '@mui/material/Box'; import Button from '@mui/material/Button'; import Card from '@mui/material/Card'; import CardActions from '@mui/material/CardActions'; import CardContent from '@mui/material/CardContent'; import CardHeader from '@mui/material/CardHeader'; import Divider from '@mui/material/Divider'; import IconButton from '@mui/material/IconButton'; import List from '@mui/material/List'; import ListItem from '@mui/material/ListItem'; import ListItemAvatar from '@mui/material/ListItemAvatar'; import ListItemText from '@mui/material/ListItemText'; import Typography from '@mui/material/Typography'; import { ArrowRight as ArrowRightIcon } from '@phosphor-icons/react/dist/ssr/ArrowRight'; import { CalendarBlank as CalendarBlankIcon } from '@phosphor-icons/react/dist/ssr/CalendarBlank'; import { DotsThree as DotsThreeIcon } from '@phosphor-icons/react/dist/ssr/DotsThree'; import { dayjs } from '@/lib/dayjs'; export interface Event { id: string; title: string; description: string; createdAt: Date; } export function Events({ events }: EventsProps): React.JSX.Element { return ( } avatar={ } subheader="Based on the linked bank accounts" title="Upcoming events" /> {events.map((event) => ( ))} ); } export interface EventItemProps { event: Event; } function EventItem({ event }: EventItemProps): React.JSX.Element { return ( {dayjs(event.createdAt).format('MMM').toUpperCase()} {dayjs(event.createdAt).format('D')} {event.title} } secondary={ {event.description} } /> ); } export interface EventsProps { events: Event[]; }