move the recipe list's toolbar to a component of its own
This commit is contained in:
parent
635bec7f64
commit
73b805546f
3 changed files with 42 additions and 21 deletions
|
|
@ -94,7 +94,7 @@ export default function RecipeEditor({ recipe, onSave, onCancel }: RecipeEditorP
|
|||
placeholder="1"
|
||||
value={draft.servings.amount}
|
||||
onChange={e => {
|
||||
let tempServings = draft.servings
|
||||
const tempServings = draft.servings
|
||||
tempServings.amount = Number(e.target.value)
|
||||
setDraft({...draft, servings: tempServings})
|
||||
}}
|
||||
|
|
@ -104,7 +104,7 @@ export default function RecipeEditor({ recipe, onSave, onCancel }: RecipeEditorP
|
|||
placeholder="Persons"
|
||||
value={draft.servings.unit}
|
||||
onChange={e => {
|
||||
let tempServings = draft.servings
|
||||
const tempServings = draft.servings
|
||||
tempServings.unit = e.target.value
|
||||
setDraft({...draft, servings: tempServings})
|
||||
}}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue