From da50e61776c2d33709a6a19f3d17b8a55427138c Mon Sep 17 00:00:00 2001 From: Mathias Wagner Date: Thu, 23 Nov 2023 07:50:23 +0100 Subject: [PATCH] Updated the SettingsProvider.jsx --- client/src/common/contexts/SettingsProvider.jsx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/client/src/common/contexts/SettingsProvider.jsx b/client/src/common/contexts/SettingsProvider.jsx index ffa12b4..cc0f8aa 100644 --- a/client/src/common/contexts/SettingsProvider.jsx +++ b/client/src/common/contexts/SettingsProvider.jsx @@ -9,6 +9,11 @@ export const SettingsProvider = ({children}) => { 1800: 40, 2200: 30 }); + const [startCapital, setStartCapital] = useState(localStorage.getItem("startCapital") || 25000); + const [costPerCake, setCostPerCake] = useState(localStorage.getItem("costPerCake") || 1000); + const [costPerRound, setCostPerRound] = useState(localStorage.getItem("costPerRound") || 4000); + const [maxProduction, setMaxProduction] = useState(localStorage.getItem("maxProduction") || 20); + const [maxPrice, setMaxPrice] = useState(localStorage.getItem("maxPrice") || 10000); const updateRounds = (newValue) => { localStorage.setItem("rounds", newValue); @@ -21,7 +26,11 @@ export const SettingsProvider = ({children}) => { } return ( - + {children} );