mirror of
https://github.com/tomru/pfadi-bussle.git
synced 2026-03-04 15:07:13 +01:00
remove unneeded stuff
This commit is contained in:
@@ -1,8 +1,6 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
import Link from 'next/link'
|
import Link from 'next/link'
|
||||||
import { useSession } from 'next-auth/react'
|
|
||||||
import Layout from '../../components/layout'
|
import Layout from '../../components/layout'
|
||||||
import Denied from '../../components/denied'
|
|
||||||
import { daysFormatFrontend } from '../../helpers/date'
|
import { daysFormatFrontend } from '../../helpers/date'
|
||||||
|
|
||||||
import { getServerSideRecentBookings } from '../../lib/getServerSideProps'
|
import { getServerSideRecentBookings } from '../../lib/getServerSideProps'
|
||||||
@@ -10,11 +8,11 @@ import { getServerSideRecentBookings } from '../../lib/getServerSideProps'
|
|||||||
export const getServerSideProps = getServerSideRecentBookings
|
export const getServerSideProps = getServerSideRecentBookings
|
||||||
|
|
||||||
function AdminRecentBookings({ bookings }) {
|
function AdminRecentBookings({ bookings }) {
|
||||||
const { data: session, status } = useSession()
|
if (!bookings || !bookings.length) {
|
||||||
|
return <Layout>
|
||||||
if (typeof window !== 'undefined' && status === 'loading') return null
|
<h3 className="text-lg leading-6 font-medium text-gray-900">No recent bookings 😿</h3>
|
||||||
|
</Layout>
|
||||||
if (!bookings) return null
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Layout>
|
<Layout>
|
||||||
|
|||||||
Reference in New Issue
Block a user