🔨 refactor(formModal/index.tsx): remove unused code related to handle_keys in the form modal

🔨 refactor(formModal/index.tsx): remove unused code related to handle_keys in the form modal to improve code readability and maintainability
This commit is contained in:
Lucas Oliveira 2023-06-29 21:29:34 -03:00
commit 2c4803d28a

View file

@ -426,19 +426,11 @@ export default function FormModal({
{tabsState[id.current].formKeysData.memory_keys.map((i, k) => ( {tabsState[id.current].formKeysData.memory_keys.map((i, k) => (
<AccordionItem key={k} value={i}> <AccordionItem key={k} value={i}>
<div className="flex flex-1 items-center justify-between py-4 font-normal transition-all group text-muted-foreground text-sm"> <div className="flex flex-1 items-center justify-between py-4 font-normal transition-all group text-muted-foreground text-sm">
<div className="group-hover:underline"><Badge size="md" variant="gray">{i}</Badge></div> <div className="group-hover:underline"><Badge size="md" variant="gray">{i}</Badge>{tabsState[id.current].formKeysData.handle_keys.some((t) => t === i) && <Badge size="sm" variant="secondary">Handle</Badge>}</div>
Used as Memory Key Used as Memory Key
</div> </div>
</AccordionItem> </AccordionItem>
))} ))}
{tabsState[id.current].formKeysData.handle_keys.map((i, k) => (
<AccordionItem key={k} value={i}>
<div className="flex flex-1 items-center justify-between py-4 font-normal transition-all group text-muted-foreground text-sm">
<div className="group-hover:underline"><Badge size="md" variant="gray">{i}</Badge></div>
Value coming from Handle
</div>
</AccordionItem>
))}
</Accordion> </Accordion>
</div> </div>
<div className="w-full"> <div className="w-full">