Merge pull request '(FIX): Fixed profile display issue.' (#85) from dev into master
All checks were successful
Deploy application with Docker / build_and_deploy (push) Successful in 55s
All checks were successful
Deploy application with Docker / build_and_deploy (push) Successful in 55s
Reviewed-on: #85
This commit is contained in:
commit
a501ddc82e
@ -115,8 +115,8 @@ export default function Profile() {
|
|||||||
<p className="text-xs md:text-sm">{user?.Email}</p>
|
<p className="text-xs md:text-sm">{user?.Email}</p>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex gap-x-4">
|
<div className="flex gap-x-4">
|
||||||
<p className="text-xs md:text-sm"><span className="font-bold">{recipes.length}</span> recipes</p>
|
<p className="text-xs md:text-sm"><span className="font-bold">{recipes?.length ?? 0}</span> recipes</p>
|
||||||
<p className="text-xs md:text-sm"><span className="font-bold">{favorites.length}</span> favorites</p>
|
<p className="text-xs md:text-sm"><span className="font-bold">{favorites?.length ?? 0}</span> favorites</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -126,10 +126,10 @@ export default function Profile() {
|
|||||||
<section className="p-8">
|
<section className="p-8">
|
||||||
<h2 className="text-2xl font-semibold text-gray-800">My Recipes</h2>
|
<h2 className="text-2xl font-semibold text-gray-800">My Recipes</h2>
|
||||||
<ul className="w-full my-2">
|
<ul className="w-full my-2">
|
||||||
{recipes.length <= 4 ? (
|
{recipes?.length <= 4 ? (
|
||||||
recipes.map(recipe => <RecipeListItem key={recipe.Id} recipe={recipe} />)
|
recipes?.map(recipe => <RecipeListItem key={recipe.Id} recipe={recipe} />)
|
||||||
) : (
|
) : (
|
||||||
recipes.slice(0, 4).map(recipe => <RecipeListItem key={recipe.Id} recipe={recipe} />)
|
recipes?.slice(0, 4).map(recipe => <RecipeListItem key={recipe.Id} recipe={recipe} />)
|
||||||
)}
|
)}
|
||||||
<button onClick={seeAllRecipesHandler} className="w-full">
|
<button onClick={seeAllRecipesHandler} className="w-full">
|
||||||
<li className="w-full border-b border-gray-300 px-2 py-4 even:bg-gray-50 hover:bg-gray-100 hover:text-blue-600 duration-150 text-center">
|
<li className="w-full border-b border-gray-300 px-2 py-4 even:bg-gray-50 hover:bg-gray-100 hover:text-blue-600 duration-150 text-center">
|
||||||
@ -143,10 +143,10 @@ export default function Profile() {
|
|||||||
<section className="p-8">
|
<section className="p-8">
|
||||||
<h2 className="text-2xl font-semibold text-gray-800">My Favorites</h2>
|
<h2 className="text-2xl font-semibold text-gray-800">My Favorites</h2>
|
||||||
<ul className="w-full my-2">
|
<ul className="w-full my-2">
|
||||||
{favorites.length <= 4 ? (
|
{favorites?.length <= 4 ? (
|
||||||
favorites.map(recipe => <RecipeListItem key={recipe.Id} recipe={recipe} />)
|
favorites?.map(recipe => <RecipeListItem key={recipe.Id} recipe={recipe} />)
|
||||||
) : (
|
) : (
|
||||||
favorites.slice(0, 4).map(recipe => <RecipeListItem key={recipe.Id} recipe={recipe} />)
|
favorites?.slice(0, 4).map(recipe => <RecipeListItem key={recipe.Id} recipe={recipe} />)
|
||||||
)}
|
)}
|
||||||
<button onClick={seeAllFavoritesHandler} className="w-full">
|
<button onClick={seeAllFavoritesHandler} className="w-full">
|
||||||
<li className="w-full border-b border-gray-300 px-2 py-4 even:bg-gray-50 hover:bg-gray-100 hover:text-blue-600 duration-150 text-center">
|
<li className="w-full border-b border-gray-300 px-2 py-4 even:bg-gray-50 hover:bg-gray-100 hover:text-blue-600 duration-150 text-center">
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user