|
|
|
@ -28,7 +28,7 @@ import { |
|
|
|
|
} from '@mui/material'; |
|
|
|
|
import { |
|
|
|
|
Add as AddIcon, Delete as DeleteIcon, ShoppingBasket as ShoppingBasketIcon, |
|
|
|
|
SoupKitchen as SoupKitchenIcon |
|
|
|
|
SoupKitchen as SoupKitchenIcon, Close as CloseIcon, TaskAlt as TaskAltIcon |
|
|
|
|
} from '@mui/icons-material'; |
|
|
|
|
import { ToBuy, Stuff, RecipeWithId, RecipeDetail } from '../types/types'; |
|
|
|
|
import { useMessage } from '../components/MessageContext'; |
|
|
|
@ -50,6 +50,8 @@ const RecipeList: React.FC = () => { |
|
|
|
|
try { |
|
|
|
|
const recipes = await recipeApi.getAllRecipes(); |
|
|
|
|
setAllRecipes(recipes); |
|
|
|
|
console.log("マックス"); |
|
|
|
|
console.log(recipes.map(recipe => recipe.maxServings)) |
|
|
|
|
} catch (error) { |
|
|
|
|
showErrorMessage("レシピの取得に失敗しました。"); |
|
|
|
|
// console.error(`${TASK_ERRORS.FETCH_FAILED}:`, error);
|
|
|
|
@ -90,6 +92,7 @@ const RecipeList: React.FC = () => { |
|
|
|
|
onClick={() => openRecipeById(recipe.recipeId)} |
|
|
|
|
> |
|
|
|
|
{recipe.recipeName} |
|
|
|
|
{recipe.maxServings === 0 && <CloseIcon />} |
|
|
|
|
</Button> |
|
|
|
|
</FormGroup> |
|
|
|
|
// </ListItem>
|
|
|
|
|