import React from 'react' import Link from 'next/link' import Layout from '../../components/layout' import { daysFormatFrontend } from '../../helpers/date' import { getServerSideRecentBookings } from '../../lib/getServerSideProps' export const getServerSideProps = getServerSideRecentBookings function AdminRecentBookings({ bookings }) { if (!bookings || !bookings.length) { return (

No recent bookings 😿

) } return ( {bookings.map((booking: any) => (

Booking {booking.uuid}

Last updated {new Date(booking.updatedAt).toLocaleString()}

Buchungszeitraum
{daysFormatFrontend(booking.days)}
Bucher
{booking.name}
Email
{booking.email}
Status
{booking.status}
))}
) } AdminRecentBookings.authenticationRequired = true export default AdminRecentBookings