@@ -181,6 +186,12 @@ const PostDesktop = ({ openReplyModal, post, roles, showAllReplies }: PostProps)
}} />
)}
+ {!cid && state === 'pending' && (
+ <>
+
+ {loadingString}
+ >
+ )}
)}
{(replies.length > 5 || (pinned && replies.length > 0)) && !isInPostPage && (
@@ -375,6 +386,11 @@ const PostMobile = ({ openReplyModal, post, roles, showAllReplies }: PostProps)
const account = useAccount();
const accountShortAddress = account?.author?.shortAddress;
+ const stateString = useStateString(post);
+ const loadingString = stateString && (
+
{stateString !== 'Failed' ? : stateString}
+ );
+
return (
@@ -448,6 +464,12 @@ const PostMobile = ({ openReplyModal, post, roles, showAllReplies }: PostProps)
}} />
)}
+ {!cid && state === 'pending' && (
+ <>
+
+ {loadingString}
+ >
+ )}
)}
diff --git a/src/views/pending-post/pending-post.module.css b/src/views/pending-post/pending-post.module.css
deleted file mode 100644
index 76b18b4d..00000000
--- a/src/views/pending-post/pending-post.module.css
+++ /dev/null
@@ -1,16 +0,0 @@
-.stateString {
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- width: calc(100vw - 28px);
- width: 100vw;
- margin-top: 10px;
- margin-left: 40px;
-}
-
-@media (max-width: 640px) {
- .stateString {
- margin-top: 0px;
- margin-left: 10px;
- }
-}
\ No newline at end of file
diff --git a/src/views/pending-post/pending-post.tsx b/src/views/pending-post/pending-post.tsx
index c8724c39..0aab5e3b 100644
--- a/src/views/pending-post/pending-post.tsx
+++ b/src/views/pending-post/pending-post.tsx
@@ -1,17 +1,13 @@
import { useEffect } from 'react';
import { useNavigate, useParams } from 'react-router-dom';
import { useAccountComment } from '@plebbit/plebbit-react-hooks';
-import styles from './pending-post.module.css';
import Post from '../../components/post';
-import useStateString from '../../hooks/use-state-string';
-import LoadingEllipsis from '../../components/loading-ellipsis';
const PendingPost = () => {
const { accountCommentIndex } = useParams<{ accountCommentIndex?: string }>();
const commentIndex = accountCommentIndex ? parseInt(accountCommentIndex) : undefined;
const post = useAccountComment({ commentIndex });
const navigate = useNavigate();
- const stateString = useStateString(post);
useEffect(() => window.scrollTo(0, 0), []);
@@ -21,16 +17,7 @@ const PendingPost = () => {
}
}, [post, navigate]);
- const loadingString = stateString && (
-
{stateString !== 'Failed' ? : stateString}
- );
-
- return (
-
- );
+ return
;
};
export default PendingPost;