Skip to content
This repository has been archived by the owner on Sep 29, 2024. It is now read-only.

Commit

Permalink
improve code readability
Browse files Browse the repository at this point in the history
  • Loading branch information
mirak55 committed Jun 9, 2024
1 parent 4427b51 commit afa511a
Showing 1 changed file with 16 additions and 19 deletions.
35 changes: 16 additions & 19 deletions frontend/src/components/recipeUpload/recipeUpload.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -201,33 +201,30 @@ return (
<div id='blocker1'></div>
<div id='blocker1'></div>

<br />
<div className="form-groupIngredient">
<label htmlFor="ingredientInput">Steps</label>
{[...Array(stepCounter)].map((_, index) => (
<div key={index}>
<input
id={`stepInput${index}`}
name={`Step ${index + 1}`}
value={steps[index]}
onChange={(e) => handleStepChange(index, e.target.value)}
/>
<label htmlFor={`ingredientInput${index}`}>{index + 1}</label>
</div>
))}
<div className="form-groupIngredient">
<label htmlFor="ingredientInput">Steps</label>
{[...Array(stepCounter)].map((_, index) => (
<div key={index}>
<input
id={`stepInput${index}`}
name={`Step ${index + 1}`}
value={steps[index]}
onChange={(e) => handleStepChange(index, e.target.value)}
/>
<label htmlFor={`ingredientInput${index}`}>{index + 1}</label>
</div>
<button className='addOneMoreIngredient' onClick={incrementStepCounter}>Add Step</button>
<br />
))}
</div>
<button className='addOneMoreIngredient' onClick={incrementStepCounter}>Add Step</button>
<br />


<div className='discription'><textarea className= "discriptionInput" name="Description" placeholder='Description' onChange={(e) => { setdescription(e.target.value); }}></textarea>
<span className='discriptionSpan'>Description</span>
</div>


<button className='addOneMoreIngredient' onClick={addRecipe}>Save Recipe</button>



</div>
</div>
</body>
Expand Down

0 comments on commit afa511a

Please sign in to comment.