diff --git a/src/components/Cellar/WinemakingTabPanel.js b/src/components/Cellar/WinemakingTabPanel.js index 4217b9c6d..75172e974 100644 --- a/src/components/Cellar/WinemakingTabPanel.js +++ b/src/components/Cellar/WinemakingTabPanel.js @@ -5,10 +5,13 @@ import Card from '@mui/material/Card' import CardContent from '@mui/material/CardContent' import ReactMarkdown from 'react-markdown' +import { WineRecipeList } from '../WineRecipeList/WineRecipeList' + import { TabPanel } from './TabPanel' export const WinemakingTabPanel = ({ index, currentTab }) => ( +
  • diff --git a/src/components/WineRecipeList/WineRecipeList.js b/src/components/WineRecipeList/WineRecipeList.js new file mode 100644 index 000000000..9d12629d3 --- /dev/null +++ b/src/components/WineRecipeList/WineRecipeList.js @@ -0,0 +1,16 @@ +import React, { useContext } from 'react' + +import { getWineVarietiesAvailableToMake } from '../../utils/getWineVarietiesAvailableToMake' +import FarmhandContext from '../Farmhand/Farmhand.context' + +export const WineRecipeList = () => { + const { + gameState: { itemsSold }, + } = useContext(FarmhandContext) + + const winesVarietiesAvailableToMake = getWineVarietiesAvailableToMake( + itemsSold + ) + + return <>{JSON.stringify(winesVarietiesAvailableToMake)} +} diff --git a/src/utils/getWineVarietiesAvailableToMake.js b/src/utils/getWineVarietiesAvailableToMake.js index 98cdeaccb..550a4accf 100644 --- a/src/utils/getWineVarietiesAvailableToMake.js +++ b/src/utils/getWineVarietiesAvailableToMake.js @@ -29,7 +29,6 @@ const getGrapesSold = itemsSold => { return grapesSold } -// FIXME: Test this /** * @param {itemsSold} itemsSold * @returns {grapeVariety[]}