mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-19 19:31:54 +03:00
Merge pull request #2023 from ecency/nt/startup-crash-fix
NT - Startup Crash
This commit is contained in:
commit
e263b397fa
@ -59,17 +59,19 @@ const TabEmptyView = ({
|
|||||||
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!leaderboard.loading) {
|
const {loading, error, data} = leaderboard;
|
||||||
if (!leaderboard.error && leaderboard.data.length > 0) {
|
if (!loading) {
|
||||||
_formatRecommendedUsers(leaderboard.data);
|
if (!error && data && data.length > 0) {
|
||||||
|
_formatRecommendedUsers(data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, [leaderboard]);
|
}, [leaderboard]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!communities.loading) {
|
const {loading, error, data} = communities;
|
||||||
if (!communities.error && communities.data?.length > 0) {
|
if (!loading) {
|
||||||
_formatRecommendedCommunities(communities.data);
|
if (!error && data && data?.length > 0) {
|
||||||
|
_formatRecommendedCommunities(data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, [communities]);
|
}, [communities]);
|
||||||
|
@ -69,7 +69,7 @@ export default function (state = initialState, action) {
|
|||||||
return {
|
return {
|
||||||
...state,
|
...state,
|
||||||
communities: {
|
communities: {
|
||||||
data: action.payload,
|
data: action.payload || [],
|
||||||
loading: false,
|
loading: false,
|
||||||
error: false,
|
error: false,
|
||||||
},
|
},
|
||||||
@ -96,7 +96,7 @@ export default function (state = initialState, action) {
|
|||||||
return {
|
return {
|
||||||
...state,
|
...state,
|
||||||
subscribedCommunities: {
|
subscribedCommunities: {
|
||||||
data: action.payload,
|
data: action.payload || [],
|
||||||
loading: false,
|
loading: false,
|
||||||
error: false,
|
error: false,
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user