From 222713a768a9aa9894cfceee8c9155d8f7cd5c37 Mon Sep 17 00:00:00 2001 From: mogaminsk Date: Thu, 22 Jun 2023 19:10:49 +0900 Subject: [PATCH] [Glitch] Fix custom signup URL may not loaded Port 8d2c26834f7a485e6fd9083b17b025ad5030e471 to glitch-soc Signed-off-by: Claire --- .../flavours/glitch/features/ui/components/header.jsx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/javascript/flavours/glitch/features/ui/components/header.jsx b/app/javascript/flavours/glitch/features/ui/components/header.jsx index bbef3a5fb8..873ff20e79 100644 --- a/app/javascript/flavours/glitch/features/ui/components/header.jsx +++ b/app/javascript/flavours/glitch/features/ui/components/header.jsx @@ -8,6 +8,7 @@ import { Link, withRouter } from 'react-router-dom'; import { connect } from 'react-redux'; import { openModal } from 'flavours/glitch/actions/modal'; +import { fetchServer } from 'flavours/glitch/actions/server'; import { Avatar } from 'flavours/glitch/components/avatar'; import { WordmarkLogo, SymbolLogo } from 'flavours/glitch/components/logo'; import Permalink from 'flavours/glitch/components/permalink'; @@ -29,6 +30,9 @@ const mapDispatchToProps = (dispatch) => ({ openClosedRegistrationsModal() { dispatch(openModal({ modalType: 'CLOSED_REGISTRATIONS' })); }, + dispatchServer() { + dispatch(fetchServer()); + } }); class Header extends PureComponent { @@ -41,8 +45,14 @@ class Header extends PureComponent { openClosedRegistrationsModal: PropTypes.func, location: PropTypes.object, signupUrl: PropTypes.string.isRequired, + dispatchServer: PropTypes.func }; + componentDidMount () { + const { dispatchServer } = this.props; + dispatchServer(); + } + render () { const { signedIn } = this.context.identity; const { location, openClosedRegistrationsModal, signupUrl } = this.props;