{location.pathname.endsWith('/settings') &&
}
- {activeCid && threadCid &&
}
+ {activeCid && threadCid && postSubplebbitAddress && (
+
+ )}
{feed.length !== 0 ? (
<>
{rules && rules.length > 0 &&
}
diff --git a/src/views/post/post.tsx b/src/views/post/post.tsx
index 0f4cf02a..f62a4a85 100644
--- a/src/views/post/post.tsx
+++ b/src/views/post/post.tsx
@@ -22,7 +22,7 @@ export interface PostProps {
roles?: Role[];
showAllReplies?: boolean;
showReplies?: boolean;
- openReplyModal?: (parentCid: string, postCid: string) => void;
+ openReplyModal?: (parentCid: string, postCid: string, subplebbitAddress: string) => void;
}
export const Post = ({ post, showAllReplies = false, showReplies = true, openReplyModal }: PostProps) => {
@@ -62,7 +62,7 @@ const PostPage = () => {
const subplebbit = useSubplebbit({ subplebbitAddress });
const { createdAt, description, rules, shortAddress, suggested, title } = subplebbit;
- const { activeCid, threadCid, closeModal, openReplyModal, showReplyModal, scrollY } = useReplyModal();
+ const { activeCid, threadCid, closeModal, openReplyModal, showReplyModal, scrollY, subplebbitAddress: postSubplebbitAddress } = useReplyModal();
const comment = useComment({ commentCid });
@@ -91,7 +91,16 @@ const PostPage = () => {
return (
{isInSettigsView && }
- {activeCid && threadCid && }
+ {activeCid && threadCid && postSubplebbitAddress && (
+
+ )}
{/* TODO: remove this replyCount error once api supports scrolling replies pages */}
{replyCount > 60 && Error: this thread has too many replies, some of them cannot be displayed right now.}
{error && Error: {error.message}}