Fix no dupes check after link unshortening

This commit is contained in:
ekzyis 2023-05-20 03:05:48 +02:00 committed by Keyan
parent f05f3deb17
commit 5c55afc97c
1 changed files with 8 additions and 0 deletions

View File

@ -80,6 +80,14 @@ export function LinkForm ({ item, sub, editThreshold, children }) {
} }
}, [data?.pageTitleAndUnshorted?.title]) }, [data?.pageTitleAndUnshorted?.title])
useEffect(() => {
if (data?.pageTitleAndUnshorted?.unshorted) {
getDupes({
variables: { url: data?.pageTitleAndUnshorted?.unshorted }
})
}
}, [data?.pageTitleAndUnshorted?.unshorted])
const [postDisabled, setPostDisabled] = useState(false) const [postDisabled, setPostDisabled] = useState(false)
const [titleOverride, setTitleOverride] = useState() const [titleOverride, setTitleOverride] = useState()