added test code to force animate

This commit is contained in:
Nouman Tahir 2023-05-31 18:27:51 +05:00
parent ce30e3e010
commit 9e0242c1b4
2 changed files with 8 additions and 2 deletions

View File

@ -67,6 +67,8 @@ const PostDisplayView = ({
const [tags, setTags] = useState([]);
const [postBodyHeight, setPostBodyHeight] = useState(0);
const [animate, setAnimate] = useState(true); //TODO: remove test code
// Component Life Cycles
useEffect(() => {
if (isLoggedIn && get(currentAccount, 'name') && !isNewPost) {
@ -75,6 +77,10 @@ const PostDisplayView = ({
pointsTy: PointActivityIds.VIEW_POST,
});
}
setTimeout(()=>{
setAnimate(false);
}, 500)
}, []);
useEffect(() => {
@ -254,7 +260,7 @@ const PostDisplayView = ({
{parentPost && <ParentPost post={parentPost} />}
<View style={styles.header}>
{!post ? (
{!post || animate ? ( //TODO: remove test code
<PostPlaceHolder />
) : (
<View

View File

@ -19,7 +19,7 @@ const PostScreen = ({ route }) => {
const [author, setAuthor] = useState(params.content?.author || params.author);
const [permlink, setPermlink] = useState(params.content?.permlink || params.permlink);
const getPostQuery = postQueries.useGetPostQuery(author, permlink, params.content);
const getPostQuery = postQueries.useGetPostQuery(author, permlink);//, params.content);
const getParentPostQuery = postQueries.useGetPostQuery();
useEffect(()=>{