import { Event } from '@/payload-types'
import { EventRowProps } from '@/components/EventRow/EventRow'

export const transformEvents = (events: Event[]): EventRowProps[] => {
  return events.map(e => {
    return {
      id: e.id,
      title: e.title,
      date: e.date,
      href: `/veranstaltungen/${e.id}`,
      location: e.location,
      cancelled: e.cancelled,
    }
  })
}