removed post card item refresh on postsContainer refresh

I believe it was uanessacry post fetch as once the list is refreshed all posts in list will refresh no matter
This commit is contained in:
Nouman Tahir 2021-03-02 17:53:20 +05:00
parent f5ef2fe764
commit 3c9612c510
2 changed files with 7 additions and 7 deletions

View File

@ -21,7 +21,7 @@ import { default as ROUTES } from '../../../constants/routeNames';
*/
const PostCardContainer = ({
isRefresh,
// isRefresh,
navigation,
currentAccount,
content,
@ -32,14 +32,15 @@ const PostCardContainer = ({
const [reblogs, setReblogs] = useState([]);
const [_content, setContent] = useState(content);
useEffect(() => {
if (isRefresh) {
_fetchPost();
}
}, [isRefresh]);
// useEffect(() => {
// if (isRefresh) {
// _fetchPost();
// }
// }, [isRefresh]);
useEffect(() => {
let isCancelled = false;
const fetchData = async (val) => {
try {
const dd = await getPostReblogs(val);

View File

@ -72,7 +72,6 @@ export const parseComments = async (comments) => {
});
};
export const isVoted = async (activeVotes, currentUserName) => {
if (!currentUserName) {
return false;