From 8e78e23a9a58116e8b6a57b16512241570d97ed1 Mon Sep 17 00:00:00 2001 From: anovazzi1 Date: Mon, 29 Apr 2024 23:29:06 -0300 Subject: [PATCH] Refactored addNewVariableButton.tsx to use useTypesStore for componentFields --- .../addNewVariableButtonComponent/addNewVariableButton.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/frontend/src/components/addNewVariableButtonComponent/addNewVariableButton.tsx b/src/frontend/src/components/addNewVariableButtonComponent/addNewVariableButton.tsx index 8dab6420f..0c83eefff 100644 --- a/src/frontend/src/components/addNewVariableButtonComponent/addNewVariableButton.tsx +++ b/src/frontend/src/components/addNewVariableButtonComponent/addNewVariableButton.tsx @@ -10,6 +10,7 @@ import { Button } from "../ui/button"; import { Input } from "../ui/input"; import { Label } from "../ui/label"; import { Textarea } from "../ui/textarea"; +import { useTypesStore } from "../../stores/typesStore"; //TODO IMPLEMENT FORM LOGIC @@ -19,6 +20,7 @@ export default function AddNewVariableButton({ children }): JSX.Element { const [type, setType] = useState(""); const [open, setOpen] = useState(false); const setErrorData = useAlertStore((state) => state.setErrorData); + const componentFields = useTypesStore((state) => state.ComponentFields); const addGlobalVariable = useGlobalVariablesStore( (state) => state.addGlobalVariable );