🔧 chore(genericModal/index.tsx): refactor useEffect hook to set input value when 'value' prop changes

This commit is contained in:
Cristhian Zanforlin Lousa 2023-07-21 11:34:23 -03:00
commit 19b874b591

View file

@ -96,6 +96,12 @@ export default function GenericModal({
}
}, [inputValue, type]);
useEffect(() => {
setInputValue(value)
}, [value])
const coloredContent = (inputValue || "")
.replace(/</g, "&lt;")
.replace(/>/g, "&gt;")