diff --git a/frontend/src/pages/StockPage.tsx b/frontend/src/pages/StockPage.tsx index 3904178..896bc2d 100644 --- a/frontend/src/pages/StockPage.tsx +++ b/frontend/src/pages/StockPage.tsx @@ -20,7 +20,7 @@ import { Box, } from '@mui/material'; -import { TASK_ERRORS } from '../constants/errorMessages'; +import { STOCK_ERRORS } from '../constants/errorMessages'; const StockPage: React.FC = () => { @@ -47,9 +47,10 @@ const StockPage: React.FC = () => { const fetchStocks = async () => { try { const stocks = await stockApi.getStocks(); + console.log('Stocks=', stocks) setStocks(stocks); } catch (error) { - console.error(`${TASK_ERRORS.FETCH_FAILED}:`, error); + console.error(`${STOCK_ERRORS.FETCH_FAILED}:`, error); } }; @@ -156,12 +157,12 @@ const StockPage: React.FC = () => { - 肉・魚 + 魚・肉 - {/* 肉・魚一覧表示エリア - 青い背景のコンテナ */} + {/* 魚・肉一覧表示エリア - 青い背景のコンテナ */}
- {stocks.filter(stock => stock.category == "肉" || stock.category == "魚").length === 0 ? null : ( + {stocks.filter(stock => stock.category == "魚・肉").length === 0 ? null : ( @@ -175,7 +176,7 @@ const StockPage: React.FC = () => { {stocks - .filter(stock => stock.category == "肉" || stock.category == "魚") // 肉と魚だけ抽出 + .filter(stock => stock.category == "魚・肉") // 「魚・肉」だけ抽出 .map(stock => (