From f6b1bca5747888320b02acae438ef05d8bdc69a3 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Tue, 12 Oct 2021 16:22:44 -0500 Subject: [PATCH] Helmet: wrap withRouter, probably fix page title getting stuck --- app/soapbox/components/helmet.js | 3 ++- app/soapbox/containers/soapbox.js | 32 ++++++++++++++++--------------- 2 files changed, 19 insertions(+), 16 deletions(-) diff --git a/app/soapbox/components/helmet.js b/app/soapbox/components/helmet.js index 91cc86c9d..8607ad4d4 100644 --- a/app/soapbox/components/helmet.js +++ b/app/soapbox/components/helmet.js @@ -1,6 +1,7 @@ import React from 'react'; import { connect } from 'react-redux'; import PropTypes from 'prop-types'; +import { withRouter } from 'react-router-dom'; import { Helmet } from'react-helmet'; import { getSettings } from 'soapbox/actions/settings'; import sourceCode from 'soapbox/utils/code'; @@ -54,4 +55,4 @@ class SoapboxHelmet extends React.Component { } -export default connect(mapStateToProps)(SoapboxHelmet); +export default withRouter(connect(mapStateToProps)(SoapboxHelmet)); diff --git a/app/soapbox/containers/soapbox.js b/app/soapbox/containers/soapbox.js index 1bde94db0..7653ee865 100644 --- a/app/soapbox/containers/soapbox.js +++ b/app/soapbox/containers/soapbox.js @@ -141,22 +141,24 @@ class SoapboxMount extends React.PureComponent { return ( - - - {themeCss && } - {customCss && customCss.map(css => ( - - ))} - - - - - {!me && } - - - - + <> + + + {themeCss && } + {customCss && customCss.map(css => ( + + ))} + + + + + {!me && } + + + + +