diff --git a/frontend/src/components/AddByRecipeDialog.tsx b/frontend/src/components/AddByRecipeDialog.tsx
index 86c9c6f..a9ec83b 100644
--- a/frontend/src/components/AddByRecipeDialog.tsx
+++ b/frontend/src/components/AddByRecipeDialog.tsx
@@ -41,7 +41,7 @@ const AddByRecipeDialog = async ({
レシピ名: {recipe.recipeName}
-
+ {/*
({recipe.maxservings})
@@ -53,7 +53,7 @@ const AddByRecipeDialog = async ({
))}
-
+
*/}
{/* レシピを追加する人数分を入力 */}
diff --git a/frontend/src/pages/AddRecipe.tsx b/frontend/src/pages/AddRecipe.tsx
index 47e0a6a..c1ca170 100644
--- a/frontend/src/pages/AddRecipe.tsx
+++ b/frontend/src/pages/AddRecipe.tsx
@@ -282,8 +282,6 @@ const AddRecipe: React.FC = () => {
))})}
-
-
材料を追加
@@ -296,11 +294,7 @@ const AddRecipe: React.FC = () => {
-
@@ -344,49 +338,6 @@ const AddRecipe: React.FC = () => {
setOpenAmountDialog(false);
}} />
- {/* 人数入力ダイアログ */}
-
>
}
diff --git a/frontend/src/pages/RecipeList.tsx b/frontend/src/pages/RecipeList.tsx
index 24d7039..3b1f090 100644
--- a/frontend/src/pages/RecipeList.tsx
+++ b/frontend/src/pages/RecipeList.tsx
@@ -62,12 +62,12 @@ const RecipeList: React.FC = () => {
const fetchAllRecipes = async () => {
try {
const recipes = await recipeApi.getAllRecipes();
+ console.log('All recipes:');
+ console.log(recipes);
setAllRecipes(recipes);
- console.log("マックス");
- console.log(allRecipes.map(recipe => recipe.maxServings))
} catch (error) {
+ console.error(`${RECIPE_ERRORS.FETCH_FAILED}:`, error);
showErrorMessage(RECIPE_ERRORS.FETCH_FAILED);
- // console.error(`${TASK_ERRORS.FETCH_FAILED}:`, error);
}
};
@@ -105,33 +105,42 @@ const RecipeList: React.FC = () => {
}
}
>
- {recipe.recipeName}
- {recipe.maxServings === 0 ?
-
-
- :
-
-
+
+
+
+
+ {recipe.maxServings ?
+
{recipe.maxServings}人分
-
-
+
+ : <>>}
-
- {
- navigate('/addRecipe/' + recipe.recipeId);
- }}
- >
-
+ {recipe.maxServings === 0 ?
+
+
+
+
+ :
+
+
+
-
- }
+ }
+
+
+ {
+ navigate('/addRecipe/' + recipe.recipeId);
+ }}
+ >
+
+
+
+
+
))}