rename prop if a component requires authentication

This commit is contained in:
Thomas Ruoff
2022-04-02 00:33:52 +02:00
parent 56478632e5
commit ba00c1a179
4 changed files with 4 additions and 4 deletions

View File

@@ -28,7 +28,7 @@ export default function MyApp({
return ( return (
<div className="flex flex-col min-h-screen"> <div className="flex flex-col min-h-screen">
<SessionProvider session={session}> <SessionProvider session={session}>
{Component.auth ? ( {Component.authenticationRequired ? (
<Auth> <Auth>
<Component {...pageProps} /> <Component {...pageProps} />
</Auth> </Auth>

View File

@@ -261,6 +261,6 @@ function BookingBillPage({
) )
} }
BookingBillPage.auth = true BookingBillPage.authenticationRequired = true
export default BookingBillPage export default BookingBillPage

View File

@@ -74,6 +74,6 @@ function ShowBookingAdmin({ booking: bookingProp }: { booking: Booking }) {
) )
} }
ShowBookingAdmin.auth = true ShowBookingAdmin.authenticationRequired = true
export default ShowBookingAdmin export default ShowBookingAdmin

View File

@@ -69,6 +69,6 @@ function AdminRecentBookings({ bookings }) {
) )
} }
AdminRecentBookings.auth = true AdminRecentBookings.authenticationRequired = true
export default AdminRecentBookings export default AdminRecentBookings