import { useBackend } from '../backend'; import { Button, LabeledList, Section, ColorBox, NoticeBox, Box } from '../components'; import { Window } from '../layouts'; export const PrecisionEditor = (props, context) => { const { act, data } = useBackend(context); // Extract `health` and `color` variables from the `data` object. const { screenstate } = data; return (
{screenstate === 'main' && } {screenstate === 'colors' && } {screenstate === 'reagents' && }
); }; const SeedStatus = (props, context) => { const { act, data } = useBackend(context); const { health, plantcolor, fruitcolor, chems, seedname } = data; return ( {chems ? ( <> {seedname} {health < 100 ? ( {100 - health + '%'} ) : ( {'UNVIABLE'} )} {plantcolor} {fruitcolor} {chems.map((item) => (