From 92e19501949bac3825c23087e0aeba3109ea12d0 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Tue, 9 Apr 2019 05:02:48 +0200 Subject: [Glitch] Fix glitched out "not found" message for non-existing profiles in web UI Port 56f29c38b603a98e7b9715c48de022106d8da073 to glitch-soc --- app/javascript/flavours/glitch/features/followers/index.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'app/javascript/flavours/glitch/features/followers/index.js') diff --git a/app/javascript/flavours/glitch/features/followers/index.js b/app/javascript/flavours/glitch/features/followers/index.js index 6bb9f60fd..2e47ab9b9 100644 --- a/app/javascript/flavours/glitch/features/followers/index.js +++ b/app/javascript/flavours/glitch/features/followers/index.js @@ -15,8 +15,10 @@ import ProfileColumnHeader from 'flavours/glitch/features/account/components/pro 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']), }); @@ -29,6 +31,7 @@ export default class Followers extends ImmutablePureComponent { dispatch: PropTypes.func.isRequired, accountIds: ImmutablePropTypes.list, hasMore: PropTypes.bool, + isAccount: PropTypes.bool, }; componentWillMount () { @@ -70,7 +73,15 @@ export default class Followers extends ImmutablePureComponent { } render () { - const { accountIds, hasMore } = this.props; + const { accountIds, hasMore, isAccount } = this.props; + + if (!isAccount) { + return ( + + + + ); + } let loadMore = null; -- cgit