From 5095e0e3b9cc27b0a998a4bd646a613e69f6a0e5 Mon Sep 17 00:00:00 2001 From: "Tom (plebeius.eth)" Date: Tue, 6 Aug 2024 22:03:19 +0200 Subject: [PATCH] fix(pending post page): opening settings would change theme --- src/components/post-form/post-form.tsx | 7 ------- src/lib/utils/view-utils.ts | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/src/components/post-form/post-form.tsx b/src/components/post-form/post-form.tsx index e1b6b1a3..48970b6e 100644 --- a/src/components/post-form/post-form.tsx +++ b/src/components/post-form/post-form.tsx @@ -256,13 +256,6 @@ const PostFormTable = ({ closeForm, postCid }: { closeForm: () => void; postCid: } }, [anonMode, getAnonAddressForPost, getAnonAddressForReply, isInPostView]); - useEffect(() => { - if (subplebbitAddress) { - resetSubmitStore(); - resetPublishReplyOptions(); - } - }, [subplebbitAddress, resetSubmitStore, resetPublishReplyOptions]); - return ( diff --git a/src/lib/utils/view-utils.ts b/src/lib/utils/view-utils.ts index 08fb3bfa..753d56bb 100644 --- a/src/lib/utils/view-utils.ts +++ b/src/lib/utils/view-utils.ts @@ -62,7 +62,7 @@ export const isHomeView = (pathname: string): boolean => { }; export const isPendingPostView = (pathname: string, params: ParamsType): boolean => { - return pathname === `/profile/${params.accountCommentIndex}`; + return pathname === `/profile/${params.accountCommentIndex}` || pathname === `/profile/${params.accountCommentIndex}/settings`; }; export const isPostPageView = (pathname: string, params: ParamsType): boolean => {