diff --git a/src/components/postsList/container/postsListContainer.tsx b/src/components/postsList/container/postsListContainer.tsx index df4cd2f2f..aaa21f987 100644 --- a/src/components/postsList/container/postsListContainer.tsx +++ b/src/components/postsList/container/postsListContainer.tsx @@ -136,27 +136,27 @@ const postsListContainer = ( //TODO: test hook, remove before PR - useEffect(() => { - if (scrollIndex && flatListRef.current) { - const _posts = data - console.log("scrollIndex", scrollIndex, "posts length", _posts.length); + // useEffect(() => { + // if (scrollIndex && flatListRef.current) { + // const _posts = data + // console.log("scrollIndex", scrollIndex, "posts length", _posts.length); - if (scrollIndex >= _posts.length) { - Alert.alert("Reached an end, scroll score, " + scrollIndex); - return; - } + // if (scrollIndex >= _posts.length) { + // Alert.alert("Reached an end, scroll score, " + scrollIndex); + // return; + // } - if (scrollIndex === _posts.length - 15) { - console.log("fetching posts"); - onLoadPosts(false); - } + // if (scrollIndex === _posts.length - 15) { + // console.log("fetching posts"); + // onLoadPosts(false); + // } - flatListRef.current.scrollToIndex({ index: scrollIndex }); - setTimeout(() => { - _handleOnContentPress(_posts[scrollIndex]) - }, 500) - } - }, [scrollIndex]) + // flatListRef.current.scrollToIndex({ index: scrollIndex }); + // setTimeout(() => { + // _handleOnContentPress(_posts[scrollIndex]) + // }, 500) + // } + // }, [scrollIndex]) useEffect(() => { diff --git a/src/screens/post/screen/postScreen.tsx b/src/screens/post/screen/postScreen.tsx index 3fcc7ee3c..7ada54c87 100644 --- a/src/screens/post/screen/postScreen.tsx +++ b/src/screens/post/screen/postScreen.tsx @@ -11,7 +11,6 @@ import { postQueries } from '../../../providers/queries'; const PostScreen = ({ - navigation, route }) => { @@ -65,14 +64,6 @@ const PostScreen = ({ getPostQuery.refetch(); }; - // // useEffect(() => { - // // const { isFetch: nextIsFetch } = route.params ?? {}; - // // if (nextIsFetch) { - // // const { author: _author, permlink } = route.params; - // // _loadPost(_author, permlink); - // // } - // // }, [route.params.isFetch]); - const _isPostUnavailable = !getPostQuery.isLoading && getPostQuery.error; @@ -117,10 +108,6 @@ const PostScreen = ({ ref={postOptionsModalRef} /> - - // - // {params.content.body} - // ); };