🔥 refactor(genericModal/index.tsx): remove unused imports and code to improve code cleanliness and performance
This commit is contained in:
parent
fb98cc6e51
commit
795436d1a3
1 changed files with 0 additions and 3 deletions
|
|
@ -15,7 +15,6 @@ import {
|
||||||
import { TypeModal } from "../../constants/enums";
|
import { TypeModal } from "../../constants/enums";
|
||||||
import { postValidatePrompt } from "../../controllers/API";
|
import { postValidatePrompt } from "../../controllers/API";
|
||||||
import useAlertStore from "../../stores/alertStore";
|
import useAlertStore from "../../stores/alertStore";
|
||||||
import useFlowStore from "../../stores/flowStore";
|
|
||||||
import { genericModalPropsType } from "../../types/components";
|
import { genericModalPropsType } from "../../types/components";
|
||||||
import { handleKeyDown } from "../../utils/reactflowUtils";
|
import { handleKeyDown } from "../../utils/reactflowUtils";
|
||||||
import { classNames, varHighlightHTML } from "../../utils/utils";
|
import { classNames, varHighlightHTML } from "../../utils/utils";
|
||||||
|
|
@ -47,7 +46,6 @@ export default function GenericModal({
|
||||||
const textRef = useRef<HTMLTextAreaElement>(null);
|
const textRef = useRef<HTMLTextAreaElement>(null);
|
||||||
const divRef = useRef(null);
|
const divRef = useRef(null);
|
||||||
const divRefPrompt = useRef(null);
|
const divRefPrompt = useRef(null);
|
||||||
const unselectAll = useFlowStore((state) => state.unselectAll);
|
|
||||||
|
|
||||||
function checkVariables(valueToCheck: string): void {
|
function checkVariables(valueToCheck: string): void {
|
||||||
const regex = /\{([^{}]+)\}/g;
|
const regex = /\{([^{}]+)\}/g;
|
||||||
|
|
@ -91,7 +89,6 @@ export default function GenericModal({
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setInputValue(value);
|
setInputValue(value);
|
||||||
unselectAll();
|
|
||||||
}, [value, modalOpen]);
|
}, [value, modalOpen]);
|
||||||
|
|
||||||
const coloredContent = (inputValue || "")
|
const coloredContent = (inputValue || "")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue