Merge branch 'actually-actually-actually-actually-fix-tabs-bar' into 'develop'

TabsBar: move withRouter to outer component

Closes #680

See merge request soapbox-pub/soapbox-fe!601
merge-requests/602/head
Alex Gleason 3 years ago
commit f208d350a2

@ -20,7 +20,6 @@ const messages = defineMessages({
post: { id: 'tabs_bar.post', defaultMessage: 'Post' },
});
@withRouter
class TabsBar extends React.PureComponent {
static propTypes = {
@ -162,10 +161,6 @@ const mapStateToProps = state => {
notificationCount: state.getIn(['notifications', 'unread']),
chatsCount: state.get('chats').reduce((acc, curr) => acc + Math.min(curr.get('unread', 0), 1), 0),
dashboardCount: reportsCount + approvalCount,
// HACK: We made things too efficient and now the tabs bar doesn't work right
// ¯\_(ツ)_/¯
forceRerender: Math.random(),
};
};
@ -178,6 +173,6 @@ const mapDispatchToProps = (dispatch) => ({
},
});
export default injectIntl(
export default withRouter(injectIntl(
connect(mapStateToProps, mapDispatchToProps, null, { forwardRef: true },
)(TabsBar));
)(TabsBar)));

Loading…
Cancel
Save