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:
parent
e8783d3a9b
commit
f50491a47e
1 changed files with 2 additions and 2 deletions
|
|
@ -45,11 +45,11 @@ export default function ShareModal({
|
||||||
const [unavaliableNames, setUnavaliableNames] = useState<string[]>([]);
|
const [unavaliableNames, setUnavaliableNames] = useState<string[]>([]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (open) {
|
if (open || internalOpen) {
|
||||||
handleGetTags();
|
handleGetTags();
|
||||||
handleGetNames();
|
handleGetNames();
|
||||||
}
|
}
|
||||||
}, [open]);
|
}, [open, internalOpen]);
|
||||||
|
|
||||||
function handleGetTags() {
|
function handleGetTags() {
|
||||||
setLoadingTags(true);
|
setLoadingTags(true);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue