Smaller refactorings, e.g., margins for title
This commit is contained in:
parent
ef8388be6d
commit
e6ea18bef8
1 changed files with 138 additions and 141 deletions
|
|
@ -22,7 +22,6 @@ export default function RecipeDetailPage() {
|
|||
useEffect(() => {
|
||||
const loadRecipe = async () => {
|
||||
if (id) {
|
||||
try {
|
||||
// Fetch recipe data when editing an existing one
|
||||
console.log("loading recipe with id", id)
|
||||
const data = await fetchRecipe(id)
|
||||
|
|
@ -30,9 +29,6 @@ export default function RecipeDetailPage() {
|
|||
throw new Error("Id mismatch when loading recipes: " + id + " requested and " + data.id + " received!");
|
||||
}
|
||||
setRecipe(mapRecipeDtoToModel(data))
|
||||
} catch (err) {
|
||||
console.error(err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -81,10 +77,11 @@ export default function RecipeDetailPage() {
|
|||
{/* Container defining the maximum width of the content */}
|
||||
<div className="content-container">
|
||||
{/* Header - remains in position when scrolling */}
|
||||
<div className="sticky bg-gray-100 top-0 left-0 right-0 pb-4 border-b-2 border-gray-300">
|
||||
<h1 className="content-title">{recipeWorkingCopy.title}</h1>
|
||||
<div className="sticky bg-gray-100 top-0 left-0 right-0 pb-6 border-b-2 border-gray-300">
|
||||
<h1 className="content-title mb-0">{recipeWorkingCopy.title}</h1>
|
||||
</div>
|
||||
|
||||
{/* Content */}
|
||||
<div className="p-6 max-w-2xl mx-auto">
|
||||
{/* Recipe image */}
|
||||
{recipe.imageUrl && (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue