diff --git a/src/components/plans/ShareModal.tsx b/src/components/plans/ShareModal.tsx index bca19a8..7dbb2ac 100644 --- a/src/components/plans/ShareModal.tsx +++ b/src/components/plans/ShareModal.tsx @@ -66,8 +66,10 @@ export function ShareModal({ const shortLinkGenerated = useRef(false); // 新流程状态 - const [hasRelationship, setHasRelationship] = useState(null); - const [isCheckingRelationship, setIsCheckingRelationship] = useState(false); + // When no factoryId (unlinked plan), we already know there's no relationship + // so initialize directly to avoid a blank-overlay flash before useEffect runs. + const [hasRelationship, setHasRelationship] = useState(factoryId ? null : false); + const [isCheckingRelationship, setIsCheckingRelationship] = useState(!!factoryId); const [existingLink, setExistingLink] = useState(null); const [isGeneratingLink, setIsGeneratingLink] = useState(false); const [pushSuccess, setPushSuccess] = useState(false);