fix(theme): theme changed incorrectly in pending post page

This commit is contained in:
Tom (plebeius.eth)
2024-08-28 22:05:20 +02:00
parent 21f75c1db1
commit 4e390a9fc5
4 changed files with 36 additions and 9 deletions
+3
View File
@@ -4,6 +4,7 @@ import { useAccountComment } from '@plebbit/plebbit-react-hooks';
import { isSettingsView } from '../../lib/utils/view-utils';
import { Post } from '../post';
import SettingsModal from '../../components/settings-modal';
import useTheme from '../../hooks/use-theme';
const PendingPost = () => {
const { accountCommentIndex } = useParams<{ accountCommentIndex?: string }>();
@@ -14,6 +15,8 @@ const PendingPost = () => {
const params = useParams();
const isInSettingsView = isSettingsView(location.pathname, params);
useTheme(post?.subplebbitAddress);
useEffect(() => window.scrollTo(0, 0), []);
useEffect(() => {