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 Input from '../../../../components/input'
import Select from '../../../../components/select'
import { Booking } from '../../../../db/booking'
@@ -115,14 +114,14 @@ function BookingBillPage({
setStoringInProgress(false)
}
const onAddAdditionalCost = function (
const onAddAdditionalCost = function(
event: React.MouseEvent<HTMLButtonElement>
) {
event.preventDefault()
setAdditionalCosts([...additionalCosts, { name: '', value: 0 }])
}
const onRemoveAdditionalCost = function (
const onRemoveAdditionalCost = function(
event: React.MouseEvent<HTMLButtonElement>,
index: number
) {
@@ -134,7 +133,7 @@ function BookingBillPage({
}
return (
<Layout>
<>
{booking && (
<form className="w-full" onSubmit={onSubmit}>
<div>
@@ -198,9 +197,8 @@ function BookingBillPage({
>
-
</button>
<label className="flabel inline">{`Kostenpunkt ${
index + 1
}`}</label>
<label className="flabel inline">{`Kostenpunkt ${index + 1
}`}</label>
</div>
<div className="ml-10 mb-3" key={`input{index}`}>
<Input
@@ -258,7 +256,7 @@ function BookingBillPage({
</button>
</form>
)}
</Layout>
</>
)
}