remove unneeded stuff

This commit is contained in:
Thomas Ruoff
2022-04-02 00:34:50 +02:00
parent ba00c1a179
commit ce72f517f2

View File

@@ -1,8 +1,6 @@
import React from 'react'
import Link from 'next/link'
import { useSession } from 'next-auth/react'
import Layout from '../../components/layout'
import Denied from '../../components/denied'
import { daysFormatFrontend } from '../../helpers/date'
import { getServerSideRecentBookings } from '../../lib/getServerSideProps'
@@ -10,11 +8,11 @@ import { getServerSideRecentBookings } from '../../lib/getServerSideProps'
export const getServerSideProps = getServerSideRecentBookings
function AdminRecentBookings({ bookings }) {
const { data: session, status } = useSession()
if (typeof window !== 'undefined' && status === 'loading') return null
if (!bookings) return null
if (!bookings || !bookings.length) {
return <Layout>
<h3 className="text-lg leading-6 font-medium text-gray-900">No recent bookings 😿</h3>
</Layout>
}
return (
<Layout>