From 017ca42b6a0dd1d88e25b0578ed5babfbc13610b Mon Sep 17 00:00:00 2001 From: Jeremy Kahn Date: Sat, 20 Apr 2024 16:22:03 -0500 Subject: [PATCH] feat(#491): show days needed to mature wine --- src/components/WineRecipeList/WineRecipe.js | 20 +++++++++++++++++++- src/data/crops/grape.js | 17 +++++++++++++++++ 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a/src/components/WineRecipeList/WineRecipe.js b/src/components/WineRecipeList/WineRecipe.js index 96c64e9a0..b17217b38 100644 --- a/src/components/WineRecipeList/WineRecipe.js +++ b/src/components/WineRecipeList/WineRecipe.js @@ -5,9 +5,13 @@ import CardHeader from '@mui/material/CardHeader' import CardActions from '@mui/material/CardActions' import Button from '@mui/material/Button' -import { grapeVarietyNameMap } from '../../data/crops/grape' +import { + grapeVarietyNameMap, + wineVarietyValueMap, +} from '../../data/crops/grape' import { grapeVariety } from '../../enums' import { wines } from '../../img' +import { integerString } from '../../utils' /** * @param {{ @@ -16,6 +20,7 @@ import { wines } from '../../img' */ export const WineRecipe = ({ wineVariety }) => { const wineName = grapeVarietyNameMap[wineVariety] + return ( { alt={wineName} /> } + subheader={ + <> +

+ Days to mature:{' '} + {integerString(3 * wineVarietyValueMap[wineVariety])} +

+ { + // FIXME: Show type and number of grapes required (4x their wineVarietyValueMap value) + // FIXME: Show number of required grapes in inventory + // FIXME: Show amount in cellar + } + + } >