diff --git a/tgui/packages/tgui/interfaces/Biogenerator.tsx b/tgui/packages/tgui/interfaces/Biogenerator.tsx index 45e63c67b89..c0ab89b16b4 100644 --- a/tgui/packages/tgui/interfaces/Biogenerator.tsx +++ b/tgui/packages/tgui/interfaces/Biogenerator.tsx @@ -1,6 +1,5 @@ import { BooleanLike } from 'common/react'; import { classes } from 'common/react'; -import { useState } from 'react'; import { useBackend, useLocalState } from '../backend'; import { @@ -185,7 +184,8 @@ export const Biogenerator = (props) => { const ItemList = (props) => { const { act } = useBackend(); const items = props.items.map((item) => { - const [amount, setAmount] = useState( + const [amount, setAmount] = useLocalState( + 'amount' + item.name, item.is_reagent ? Math.min(Math.max(props.space, 1), 10) : 1, ); const disabled = diff --git a/tgui/packages/tgui/interfaces/PaperSheet.tsx b/tgui/packages/tgui/interfaces/PaperSheet.tsx index cde38fa9694..5e239d79c76 100644 --- a/tgui/packages/tgui/interfaces/PaperSheet.tsx +++ b/tgui/packages/tgui/interfaces/PaperSheet.tsx @@ -5,7 +5,7 @@ import { clamp } from 'common/math'; import { classes } from 'common/react'; import { marked } from 'marked'; -import { Component, createRef, RefObject, useState } from 'react'; +import { Component, createRef, RefObject } from 'react'; import { useBackend, useLocalState } from '../backend'; import { Box, Button, Flex, Section, TextArea } from '../components'; @@ -315,7 +315,7 @@ export class PrimaryView extends Component { {}, ); - const [textAreaText, setTextAreaText] = useState(''); + const [textAreaText, setTextAreaText] = useLocalState('textAreaText', ''); const interactMode = held_item_details?.interaction_mode || InteractionType.reading;