move Layout into _app.tsx

This commit is contained in:
Thomas Ruoff
2022-09-09 00:17:47 +02:00
committed by Thomas Ruoff
parent 7389289b81
commit 2fd3a47e72
12 changed files with 112 additions and 132 deletions

View File

@@ -1,6 +1,5 @@
import React from 'react'
import BookingTable from '../../components/bookingTable'
import Layout from '../../components/layout'
import { getServerSideRecentBookings } from '../../lib/getServerSideProps'
@@ -9,20 +8,18 @@ export const getServerSideProps = getServerSideRecentBookings
function AdminRecentBookings({ bookings }) {
if (!bookings || !bookings.length) {
return (
<Layout>
<h3 className="text-lg leading-6 font-medium text-gray-900">
No recent bookings 😿
</h3>
</Layout>
<h3 className="text-lg leading-6 font-medium text-gray-900">
No recent bookings 😿
</h3>
)
}
return (
<Layout>
<>
{bookings.map((booking: any) => (
<BookingTable key={booking.uuid} booking={booking} />
))}
</Layout>
</>
)
}