🐛 fix(genericModal/index.tsx): move setValue(inputValue) before the switch statement to ensure proper value assignment

This commit is contained in:
Lucas Oliveira 2023-07-06 15:28:54 -03:00
commit 5dc73b41b6

View file

@ -282,9 +282,9 @@ export default function GenericModal({
<Button <Button
className="mt-3" className="mt-3"
onClick={() => { onClick={() => {
setValue(inputValue);
switch (myModalType) { switch (myModalType) {
case 1: case 1:
setValue(inputValue);
setModalOpen(false); setModalOpen(false);
break; break;
case 2: case 2: