error message improvement

This commit is contained in:
feruz 2020-10-19 12:48:27 +03:00
parent ac800d4159
commit 2c65570d6c
4 changed files with 9 additions and 6 deletions

View File

@ -1,4 +1,4 @@
import React, { useCallback, useState, useEffect } from 'react';
import React, { useCallback, useState, useEffect, useRef } from 'react';
import { useDispatch, useSelector } from 'react-redux';
import get from 'lodash/get';
import unionBy from 'lodash/unionBy';
@ -50,6 +50,7 @@ const PostsContainer = ({
const [selectedFilterValue, setSelectedFilterValue] = useState(
filterOptionsValue && filterOptionsValue[selectedFilterIndex],
);
const elem = useRef(null);
useEffect(() => {
if (isConnected) {
@ -103,6 +104,8 @@ const PostsContainer = ({
dispatch(hidePostsThumbnails(!isHideImages));
};
const checkIfMounted = () => elem.current != null;
const _getPromotePosts = useCallback(async () => {
if (pageType === 'profiles') {
return;
@ -195,8 +198,8 @@ const PostsContainer = ({
_posts = unionBy(posts, _posts, 'permlink');
}
}
if (posts.length < 4 && pageType !== 'profiles') {
console.log('mounted?', checkIfMounted());
if (posts.length <= 4 && pageType !== 'profiles') {
_setFeedPosts(_posts);
}
@ -265,6 +268,7 @@ const PostsContainer = ({
return (
<PostsView
ref={elem}
filterOptions={filterOptions}
handleImagesHide={_handleImagesHide}
handleOnScroll={handleOnScroll}

View File

@ -1,5 +1,5 @@
/* eslint-disable react/jsx-wrap-multilines */
import React, { useRef } from 'react';
import React, { useRef, useEffect, useState } from 'react';
import { FlatList, View, ActivityIndicator, RefreshControl } from 'react-native';
import { useIntl } from 'react-intl';
import { withNavigation } from 'react-navigation';

View File

@ -341,7 +341,7 @@
"payloadTooLarge": "File size too big, please resize or upload smaller image",
"qoutaExceeded": "Upload quota exceeded",
"invalidImage": "Invalid image, try different file",
"something_wrong": "Something went wrong."
"something_wrong": "Something went wrong. Try https://ecency.com until we fix the issue!"
},
"post": {
"reblog_alert": "Are you sure, you want to reblog?",

View File

@ -71,7 +71,6 @@ export const makeOptions = (postObj) => {
percent_hbd: 10000,
extensions: [[0, { beneficiaries: [] }]],
};
console.log(postObj);
switch (postObj.operationType) {
case 'sp':
a.max_accepted_payout = '1000000.000 HBD';