fix(post): share links could be broken for posts that failed to publish

This commit is contained in:
Tom (plebeius.eth)
2025-05-31 23:15:07 +02:00
parent a75e5b48aa
commit b35edac0d4

View File

@@ -79,7 +79,7 @@ const ShareButton = ({ cid, subplebbitAddress }: { cid: string; subplebbitAddres
};
return (
<li className={`${!hasCopied ? styles.button : styles.text}`} onClick={handleCopy}>
<li className={`${!hasCopied ? styles.button : styles.text}`} onClick={() => cid && handleCopy()}>
{hasCopied ? t('link_copied') : t('share')}
</li>
);