diff --git a/app/javascript/gabsocial/pages/group_page.js b/app/javascript/gabsocial/pages/group_page.js index 31aa01cb..e9a4a90a 100644 --- a/app/javascript/gabsocial/pages/group_page.js +++ b/app/javascript/gabsocial/pages/group_page.js @@ -16,13 +16,21 @@ import Divider from '../components/divider' class GroupPage extends ImmutablePureComponent { componentDidMount() { - this.props.dispatch(fetchGroup(this.props.params.id)) + if (!this.props.group) { + this.props.dispatch(fetchGroup(this.props.params.id)) + } } componentWillUnmount() { //Reset group composer this.props.dispatch(changeComposeGroupId(null)) } + + componentDidUpdate(prevProps) { + if (!!this.props.group && prevProps.params.id !== this.props.params.id) { + this.props.dispatch(fetchGroup(this.props.params.id)) + } + } render() { const {