mirror of
https://github.com/tomru/pfadi-bussle.git
synced 2026-03-03 14:37:13 +01:00
29 lines
673 B
TypeScript
29 lines
673 B
TypeScript
import React from 'react'
|
|
import BookingTable from '../../components/bookingTable'
|
|
|
|
import { getServerSideRecentBookings } from '../../lib/getServerSideProps'
|
|
|
|
export const getServerSideProps = getServerSideRecentBookings
|
|
|
|
function AdminRecentBookings({ bookings }) {
|
|
if (!bookings || !bookings.length) {
|
|
return (
|
|
<h3 className="text-lg leading-6 font-medium text-gray-900">
|
|
No recent bookings 😿
|
|
</h3>
|
|
)
|
|
}
|
|
|
|
return (
|
|
<>
|
|
{bookings.map((booking: any) => (
|
|
<BookingTable key={booking.uuid} booking={booking} />
|
|
))}
|
|
</>
|
|
)
|
|
}
|
|
|
|
AdminRecentBookings.authenticationRequired = true
|
|
|
|
export default AdminRecentBookings
|