From 5c55afc97cb5a67d9f85d19381adcd571d5060bb Mon Sep 17 00:00:00 2001 From: ekzyis Date: Sat, 20 May 2023 03:05:48 +0200 Subject: [PATCH] Fix no dupes check after link unshortening --- components/link-form.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/components/link-form.js b/components/link-form.js index e33d08b5..be6802c2 100644 --- a/components/link-form.js +++ b/components/link-form.js @@ -80,6 +80,14 @@ export function LinkForm ({ item, sub, editThreshold, children }) { } }, [data?.pageTitleAndUnshorted?.title]) + useEffect(() => { + if (data?.pageTitleAndUnshorted?.unshorted) { + getDupes({ + variables: { url: data?.pageTitleAndUnshorted?.unshorted } + }) + } + }, [data?.pageTitleAndUnshorted?.unshorted]) + const [postDisabled, setPostDisabled] = useState(false) const [titleOverride, setTitleOverride] = useState()