mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-18 10:52:16 +03:00
lint
This commit is contained in:
parent
1cc4795ef3
commit
e14c8459ce
@ -464,9 +464,7 @@ const MarkdownEditorView = ({
|
||||
animationType="slide"
|
||||
style={styles.modalStyle}
|
||||
>
|
||||
<SnippetsModal
|
||||
handleOnSelect={_handleOnSnippetReceived}
|
||||
/>
|
||||
<SnippetsModal handleOnSelect={_handleOnSnippetReceived} />
|
||||
</Modal>
|
||||
|
||||
<UploadsGalleryModal
|
||||
|
@ -274,7 +274,7 @@ class ProfileContainer extends Component {
|
||||
const res = await getRelationship(currentAccount.name, username);
|
||||
_isFollowing = res && res.follows;
|
||||
_isMuted = res && res.ignores;
|
||||
isFavorite = await checkFavorite(username)
|
||||
isFavorite = await checkFavorite(username);
|
||||
}
|
||||
|
||||
try {
|
||||
@ -296,12 +296,14 @@ class ProfileContainer extends Component {
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
catch(error){
|
||||
console.warn("Failed to fetch complete profile data", error);
|
||||
Alert.alert(intl.formatMessage({
|
||||
} catch (error) {
|
||||
console.warn('Failed to fetch complete profile data', error);
|
||||
Alert.alert(
|
||||
intl.formatMessage({
|
||||
id: 'alert.fail',
|
||||
}), error.message || error.toString())
|
||||
}),
|
||||
error.message || error.toString(),
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
@ -359,7 +361,8 @@ class ProfileContainer extends Component {
|
||||
favoriteAction = addFavorite;
|
||||
}
|
||||
|
||||
favoriteAction(username).then(() => {
|
||||
favoriteAction(username)
|
||||
.then(() => {
|
||||
dispatch(
|
||||
toastNotification(
|
||||
intl.formatMessage({
|
||||
@ -370,13 +373,13 @@ class ProfileContainer extends Component {
|
||||
this.setState({ isFavorite: !isFavorite, isProfileLoading: false });
|
||||
})
|
||||
.catch((error) => {
|
||||
console.warn("Failed to perform favorite action")
|
||||
console.warn('Failed to perform favorite action');
|
||||
Alert.alert(
|
||||
intl.formatMessage({
|
||||
id: 'alert.fail',
|
||||
}),
|
||||
error.message || error.toString()
|
||||
)
|
||||
error.message || error.toString(),
|
||||
);
|
||||
});
|
||||
};
|
||||
|
||||
|
@ -43,7 +43,11 @@ import {
|
||||
} from '../../../realm/realm';
|
||||
import { getUser, getPost } from '../../../providers/hive/dhive';
|
||||
import { migrateToMasterKeyWithAccessToken, switchAccount } from '../../../providers/hive/auth';
|
||||
import { setPushToken, markActivityAsRead, markNotifications } from '../../../providers/ecency/ecency';
|
||||
import {
|
||||
setPushToken,
|
||||
markActivityAsRead,
|
||||
markNotifications,
|
||||
} from '../../../providers/ecency/ecency';
|
||||
import { navigate } from '../../../navigation/service';
|
||||
|
||||
// Actions
|
||||
|
@ -101,7 +101,7 @@ const DraftsContainer = ({ currentAccount, intl, navigation, dispatch }) => {
|
||||
_getSchedules();
|
||||
})
|
||||
.catch((error) => {
|
||||
console.warn("Failed to move scheduled post to drafts")
|
||||
console.warn('Failed to move scheduled post to drafts');
|
||||
dispatch(toastNotification(intl.formatMessage({ id: 'alert.fail' })));
|
||||
});
|
||||
};
|
||||
|
@ -945,7 +945,8 @@ class EditorContainer extends Component {
|
||||
data.jsonMeta,
|
||||
options,
|
||||
data.scheduleDate,
|
||||
) .then(() => {
|
||||
)
|
||||
.then(() => {
|
||||
this.setState({
|
||||
isPostSending: false,
|
||||
});
|
||||
@ -973,7 +974,7 @@ class EditorContainer extends Component {
|
||||
}, 3000);
|
||||
})
|
||||
.catch((error) => {
|
||||
console.warn("Failed to schedule post", error);
|
||||
console.warn('Failed to schedule post', error);
|
||||
this.setState({
|
||||
isPostSending: false,
|
||||
});
|
||||
|
@ -150,9 +150,7 @@ class NotificationContainer extends Component {
|
||||
(nextProps.activeBottomTab === ROUTES.TABBAR.NOTIFICATION && nextProps.username) ||
|
||||
(nextProps.username !== username && nextProps.username)
|
||||
) {
|
||||
this.setState({ endOfNotification: false }, () =>
|
||||
this._getActivities(selectedFilter),
|
||||
);
|
||||
this.setState({ endOfNotification: false }, () => this._getActivities(selectedFilter));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -49,19 +49,17 @@ const RegisterContainer = ({ children, navigation }) => {
|
||||
})
|
||||
.catch((err) => {
|
||||
if (get(err, 'response.status') === 500) {
|
||||
Alert.alert(intl.formatMessage(
|
||||
{ id: 'alert.fail'}),
|
||||
intl.formatMessage({ id: 'register.500_error' }));
|
||||
}
|
||||
else if (get(err, 'response.data.message')) {
|
||||
Alert.alert(intl.formatMessage(
|
||||
{ id: 'alert.fail'}),
|
||||
err.response.data.message);
|
||||
}
|
||||
else {
|
||||
Alert.alert(intl.formatMessage(
|
||||
{ id: 'alert.fail'}),
|
||||
intl.formatMessage({ id: 'alert.unknow_error' }));
|
||||
Alert.alert(
|
||||
intl.formatMessage({ id: 'alert.fail' }),
|
||||
intl.formatMessage({ id: 'register.500_error' }),
|
||||
);
|
||||
} else if (get(err, 'response.data.message')) {
|
||||
Alert.alert(intl.formatMessage({ id: 'alert.fail' }), err.response.data.message);
|
||||
} else {
|
||||
Alert.alert(
|
||||
intl.formatMessage({ id: 'alert.fail' }),
|
||||
intl.formatMessage({ id: 'alert.unknow_error' }),
|
||||
);
|
||||
}
|
||||
setIsLoading(false);
|
||||
});
|
||||
|
@ -104,8 +104,8 @@ const PostsResultsContainer = ({ children, navigation, searchValue }) => {
|
||||
setData([...data, ...res.results]);
|
||||
})
|
||||
.catch(() => {
|
||||
console.warn("Search Failed");
|
||||
})
|
||||
console.warn('Search Failed');
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user