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,5 +1,4 @@
import React, { useEffect, useState } from 'react'
import Layout from '../../../components/layout'
import { getServerSideBooking } from '../../../lib/getServerSideProps'
import { Booking } from '../../../db/booking'
import { BOOKING_STATUS } from '../../../db/enums'
@@ -41,7 +40,7 @@ export default function ShowBooking({
}
return (
<Layout>
<>
<div>
<strong>Buchungsstatus:</strong> {getBookingStatus(booking.status)}
</div>
@@ -54,16 +53,16 @@ export default function ShowBooking({
{[BOOKING_STATUS.CONFIRMED, BOOKING_STATUS.REQUESTED].includes(
booking.status
) && (
<div className="my-6">
<button
onClick={onCancelBooking}
className="btn btn-red"
disabled={storingBooking}
>
Buchung Stornieren
</button>
</div>
)}
</Layout>
<div className="my-6">
<button
onClick={onCancelBooking}
className="btn btn-red"
disabled={storingBooking}
>
Buchung Stornieren
</button>
</div>
)}
</>
)
}

View File

@@ -1,6 +1,5 @@
import React, { useEffect, useState } from 'react'
import Link from 'next/link'
import Layout from '../../../components/layout'
import { Booking } from '../../../db/booking'
import { loadBookingData, storeBookingData } from '../../../helpers/storage'
import { getServerSideBooking } from '../../../lib/getServerSideProps'
@@ -19,7 +18,7 @@ export default function ShowBookingStored({ booking }: { booking: Booking }) {
}
return (
<Layout>
<>
<h3 className="thanks mb-3 mt-6 text-lg">
Vielen Dank für die Buchungsanfrage
</h3>
@@ -52,6 +51,6 @@ export default function ShowBookingStored({ booking }: { booking: Booking }) {
</p>
</div>
)}
</Layout>
</>
)
}