Updated GroupPage to fetch group on component update if id changes
• Updated: - GroupPage to fetch group on component update if id changes • Fixes: - Issue where going from group -> group (like from shortcut to shortcut) and the group children components dont update
This commit is contained in:
parent
985faeb930
commit
af7c82221d
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue