diff --git a/apps/web/src/components/game/craftingPanel.tsx b/apps/web/src/components/game/craftingPanel.tsx index 86ddcb4..e1deb95 100644 --- a/apps/web/src/components/game/craftingPanel.tsx +++ b/apps/web/src/components/game/craftingPanel.tsx @@ -26,7 +26,9 @@ const bonusLabel: Record = { */ const CraftingPanel = (): JSX.Element => { const { state, craftRecipe, formatNumber } = useGame(); - const [ activeZoneId, setActiveZoneId ] = useState("verdant_vale"); + const [ activeZoneId, setActiveZoneId ] = useState(() => { + return sessionStorage.getItem("elysium_craft_zone") ?? "verdant_vale"; + }); const [ pendingRecipeId, setPendingRecipeId ] = useState(null); if (state === null) { @@ -68,6 +70,11 @@ const CraftingPanel = (): JSX.Element => { }); } + function handleZoneSelect(zoneId: string): void { + setActiveZoneId(zoneId); + sessionStorage.setItem("elysium_craft_zone", zoneId); + } + async function handleCraft(recipeId: string): Promise { setPendingRecipeId(recipeId); try { @@ -85,7 +92,7 @@ const CraftingPanel = (): JSX.Element => {