The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
fix runKeyChecks
Steven Teyf21992ada60b
diff --git a/apps/web/ui/links/short-link-input.tsx b/apps/web/ui/links/short-link-input.tsxindex 2c0c60e0ea..44f146f3de 100644--- a/apps/web/ui/links/short-link-input.tsx+++ b/apps/web/ui/links/short-link-input.tsx@@ -131,10 +131,14 @@ export const ShortLinkInput = forwardRef<HTMLInputElement, ShortLinkInputProps>(const [debouncedKey] = useDebounce(key, 500);useEffect(() => {- if (debouncedKey) {+ // only run key checks if:+ // - there is a key+ // - there is a workspace+ // - it's not an existing link+ if (debouncedKey && workspaceId && !existingLink) {runKeyChecks(debouncedKey);}- }, [debouncedKey]);+ }, [debouncedKey, workspaceId, existingLink]);const [generatedKeys, setGeneratedKeys] = useState<string[]>(existingLink && key ? [key] : [],