if (error.response) {
const { data, status, statusText } = error.response;
+ if (status === 404 || status === 410) {
+ // Skip these errors as they are reflected in the UI
+ return {};
+ }
+
let message = statusText;
let title = `${status}`;
import HeaderContainer from 'flavours/glitch/features/account_timeline/containers/header_container';
import { ScrollContainer } from 'react-router-scroll-4';
import LoadMore from 'flavours/glitch/components/load_more';
+import MissingIndicator from 'flavours/glitch/components/missing_indicator';
const mapStateToProps = (state, props) => ({
+ isAccount: !!state.getIn(['accounts', props.params.accountId]),
medias: getAccountGallery(state, props.params.accountId),
isLoading: state.getIn(['timelines', `account:${props.params.accountId}:media`, 'isLoading']),
hasMore: state.getIn(['timelines', `account:${props.params.accountId}:media`, 'hasMore']),
medias: ImmutablePropTypes.list.isRequired,
isLoading: PropTypes.bool,
hasMore: PropTypes.bool,
+ isAccount: PropTypes.bool,
};
componentDidMount () {
}
render () {
- const { medias, isLoading, hasMore } = this.props;
+ const { medias, isLoading, hasMore, isAccount } = this.props;
+
+ if (!isAccount) {
+ return (
+ <Column>
+ <MissingIndicator />
+ </Column>
+ );
+ }
let loadOlder = null;
import PropTypes from 'prop-types';
import InnerHeader from 'flavours/glitch/features/account/components/header';
import ActionBar from 'flavours/glitch/features/account/components/action_bar';
-import MissingIndicator from 'flavours/glitch/components/missing_indicator';
import ImmutablePureComponent from 'react-immutable-pure-component';
import { FormattedMessage } from 'react-intl';
import { NavLink } from 'react-router-dom';
const { account, hideTabs, identity_proofs } = this.props;
if (account === null) {
- return <MissingIndicator />;
+ return null;
}
return (
import ImmutablePureComponent from 'react-immutable-pure-component';
import { FormattedMessage } from 'react-intl';
import { fetchAccountIdentityProofs } from '../../actions/identity_proofs';
+import MissingIndicator from 'flavours/glitch/components/missing_indicator';
const mapStateToProps = (state, { params: { accountId }, withReplies = false }) => {
const path = withReplies ? `${accountId}:with_replies` : accountId;
return {
+ isAccount: !!state.getIn(['accounts', accountId]),
statusIds: state.getIn(['timelines', `account:${path}`, 'items'], ImmutableList()),
featuredStatusIds: withReplies ? ImmutableList() : state.getIn(['timelines', `account:${accountId}:pinned`, 'items'], ImmutableList()),
isLoading: state.getIn(['timelines', `account:${path}`, 'isLoading']),
isLoading: PropTypes.bool,
hasMore: PropTypes.bool,
withReplies: PropTypes.bool,
+ isAccount: PropTypes.bool,
};
componentWillMount () {
}
render () {
- const { statusIds, featuredStatusIds, isLoading, hasMore } = this.props;
+ const { statusIds, featuredStatusIds, isLoading, hasMore, isAccount } = this.props;
+
+ if (!isAccount) {
+ return (
+ <Column>
+ <MissingIndicator />
+ </Column>
+ );
+ }
if (!statusIds && isLoading) {
return (
import HeaderContainer from 'flavours/glitch/features/account_timeline/containers/header_container';
import LoadMore from 'flavours/glitch/components/load_more';
import ImmutablePureComponent from 'react-immutable-pure-component';
+import MissingIndicator from 'flavours/glitch/components/missing_indicator';
const mapStateToProps = (state, props) => ({
+ isAccount: !!state.getIn(['accounts', props.params.accountId]),
accountIds: state.getIn(['user_lists', 'followers', props.params.accountId, 'items']),
hasMore: !!state.getIn(['user_lists', 'followers', props.params.accountId, 'next']),
});
dispatch: PropTypes.func.isRequired,
accountIds: ImmutablePropTypes.list,
hasMore: PropTypes.bool,
+ isAccount: PropTypes.bool,
};
componentWillMount () {
}
render () {
- const { accountIds, hasMore } = this.props;
+ const { accountIds, hasMore, isAccount } = this.props;
+
+ if (!isAccount) {
+ return (
+ <Column>
+ <MissingIndicator />
+ </Column>
+ );
+ }
let loadMore = null;
import HeaderContainer from 'flavours/glitch/features/account_timeline/containers/header_container';
import LoadMore from 'flavours/glitch/components/load_more';
import ImmutablePureComponent from 'react-immutable-pure-component';
+import MissingIndicator from 'flavours/glitch/components/missing_indicator';
const mapStateToProps = (state, props) => ({
+ isAccount: !!state.getIn(['accounts', props.params.accountId]),
accountIds: state.getIn(['user_lists', 'following', props.params.accountId, 'items']),
hasMore: !!state.getIn(['user_lists', 'following', props.params.accountId, 'next']),
});
dispatch: PropTypes.func.isRequired,
accountIds: ImmutablePropTypes.list,
hasMore: PropTypes.bool,
+ isAccount: PropTypes.bool,
};
componentWillMount () {
}
render () {
- const { accountIds, hasMore } = this.props;
+ const { accountIds, hasMore, isAccount } = this.props;
+
+ if (!isAccount) {
+ return (
+ <Column>
+ <MissingIndicator />
+ </Column>
+ );
+ }
let loadMore = null;