diff --git a/apps/web/src/components/Composer/NewPublication.tsx b/apps/web/src/components/Composer/NewPublication.tsx index 8f994e68765f..dad3b8dc8162 100644 --- a/apps/web/src/components/Composer/NewPublication.tsx +++ b/apps/web/src/components/Composer/NewPublication.tsx @@ -267,8 +267,8 @@ const NewPublication: FC = ({ className, post }) => { variables: { request: { contentUri: `${METADATA_ENDPOINT}/${metadataId}`, - ...(isComment && { commentOn: post?.id }), - ...(isQuote && { quoteOf: quotedPost?.id }), + ...(isComment && { commentOn: { post: post?.id } }), + ...(isQuote && { quoteOf: { post: quotedPost?.id } }), ...(collectModule.type && { actions: [{ collectAction: collectModuleParams(collectModule) }] }) diff --git a/apps/web/src/components/Post/Actions/Share/Repost.tsx b/apps/web/src/components/Post/Actions/Share/Repost.tsx index f8f17757552a..583f44a76cde 100644 --- a/apps/web/src/components/Post/Actions/Share/Repost.tsx +++ b/apps/web/src/components/Post/Actions/Share/Repost.tsx @@ -31,7 +31,9 @@ interface RepostProps { const Repost: FC = ({ isLoading, post, setIsLoading }) => { const { currentAccount } = useAccountStore(); const { isSuspended } = useAccountStatus(); - const hasReposted = post.operations?.hasReposted.optimistic; + const hasReposted = + post.operations?.hasReposted.optimistic || + post.operations?.hasReposted.onChain; const [shares, { increment }] = useCounter( post.stats.reposts + post.stats.quotes diff --git a/apps/web/src/components/Post/Actions/Share/index.tsx b/apps/web/src/components/Post/Actions/Share/index.tsx index 0fb76ab965df..a516a82c5d88 100644 --- a/apps/web/src/components/Post/Actions/Share/index.tsx +++ b/apps/web/src/components/Post/Actions/Share/index.tsx @@ -22,9 +22,13 @@ interface ShareMenuProps { const ShareMenu: FC = ({ post, showCount }) => { const [isLoading, setIsLoading] = useState(false); const targetPost = isRepost(post) ? post?.repostOf : post; - const hasShared = + const hasReposted = targetPost.operations?.hasReposted.optimistic || - targetPost.operations?.hasQuoted.optimistic; + targetPost.operations?.hasReposted.onChain; + const hasQuoted = + targetPost.operations?.hasQuoted.optimistic || + targetPost.operations?.hasQuoted.onChain; + const hasShared = hasReposted || hasQuoted; const shares = targetPost.stats.reposts + targetPost.stats.quotes; const iconClassName = "w-[15px] sm:w-[18px]"; @@ -72,14 +76,13 @@ const ShareMenu: FC = ({ post, showCount }) => { post={targetPost} setIsLoading={setIsLoading} /> - {targetPost.operations?.hasReposted.optimistic && - targetPost.id !== post.id && ( - - )} + {hasReposted && targetPost.id !== post.id && ( + + )}