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 --- .../flavours/glitch/features/account_gallery/index.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'app/javascript/flavours/glitch/features/account_gallery') diff --git a/app/javascript/flavours/glitch/features/account_gallery/index.js b/app/javascript/flavours/glitch/features/account_gallery/index.js index 63c1b2d86..3b1af108f 100644 --- a/app/javascript/flavours/glitch/features/account_gallery/index.js +++ b/app/javascript/flavours/glitch/features/account_gallery/index.js @@ -13,8 +13,10 @@ import MediaItem from './components/media_item'; 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']), @@ -51,6 +53,7 @@ export default class AccountGallery extends ImmutablePureComponent { medias: ImmutablePropTypes.list.isRequired, isLoading: PropTypes.bool, hasMore: PropTypes.bool, + isAccount: PropTypes.bool, }; componentDidMount () { @@ -103,7 +106,15 @@ export default class AccountGallery extends ImmutablePureComponent { } render () { - const { medias, isLoading, hasMore } = this.props; + const { medias, isLoading, hasMore, isAccount } = this.props; + + if (!isAccount) { + return ( + + + + ); + } let loadOlder = null; -- cgit