🔥 refactor(genericModal/index.tsx): remove unused imports and code to improve code cleanliness and performance

This commit is contained in:
cristhianzl 2024-02-23 17:30:51 -03:00
commit 795436d1a3

View file

@ -15,7 +15,6 @@ import {
import { TypeModal } from "../../constants/enums";
import { postValidatePrompt } from "../../controllers/API";
import useAlertStore from "../../stores/alertStore";
import useFlowStore from "../../stores/flowStore";
import { genericModalPropsType } from "../../types/components";
import { handleKeyDown } from "../../utils/reactflowUtils";
import { classNames, varHighlightHTML } from "../../utils/utils";
@ -47,7 +46,6 @@ export default function GenericModal({
const textRef = useRef<HTMLTextAreaElement>(null);
const divRef = useRef(null);
const divRefPrompt = useRef(null);
const unselectAll = useFlowStore((state) => state.unselectAll);
function checkVariables(valueToCheck: string): void {
const regex = /\{([^{}]+)\}/g;
@ -91,7 +89,6 @@ export default function GenericModal({
useEffect(() => {
setInputValue(value);
unselectAll();
}, [value, modalOpen]);
const coloredContent = (inputValue || "")