From 48a80464862f618d86d57bd3e8859077499b994a Mon Sep 17 00:00:00 2001 From: "Tom (plebeius.eth)" Date: Tue, 28 Jan 2025 19:04:57 +0100 Subject: [PATCH] fix(subplebbit): subplebbit could erroneously appear offline while publishing a post --- src/components/post-form/post-form.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/post-form/post-form.tsx b/src/components/post-form/post-form.tsx index 0d4e1339..c4f2151e 100644 --- a/src/components/post-form/post-form.tsx +++ b/src/components/post-form/post-form.tsx @@ -401,7 +401,9 @@ const PostForm = () => { const [showForm, setShowForm] = useState(false); - const subplebbit = useSubplebbit({ subplebbitAddress: params?.subplebbitAddress }); + const accountComment = useAccountComment({ commentIndex: params?.accountCommentIndex as any }); + const subplebbitAddress = params?.subplebbitAddress || accountComment?.subplebbitAddress; + const subplebbit = useSubplebbit({ subplebbitAddress }); const { isOffline, isOnlineStatusLoading, offlineTitle } = useIsSubplebbitOffline(subplebbit); return (