fix(shareModal/index.tsx): update useEffect dependency array to include internalOpen variable to ensure proper handling of API calls when modal is open or internalOpen is true

This commit is contained in:
anovazzi1 2023-11-21 22:36:20 -03:00
commit f50491a47e

View file

@ -45,11 +45,11 @@ export default function ShareModal({
const [unavaliableNames, setUnavaliableNames] = useState<string[]>([]);
useEffect(() => {
if (open) {
if (open || internalOpen) {
handleGetTags();
handleGetNames();
}
}, [open]);
}, [open, internalOpen]);
function handleGetTags() {
setLoadingTags(true);