Skip to content

Commit

Permalink
Fix custom signup URL may not loaded (#25531)
Browse files Browse the repository at this point in the history
  • Loading branch information
mgmn committed Jun 22, 2023
1 parent 0b39b9a commit 8d2c268
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions app/javascript/mastodon/features/ui/components/header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { Link, withRouter } from 'react-router-dom';
import { connect } from 'react-redux';

import { openModal } from 'mastodon/actions/modal';
import { fetchServer } from 'mastodon/actions/server';
import { Avatar } from 'mastodon/components/avatar';
import { WordmarkLogo, SymbolLogo } from 'mastodon/components/logo';
import { registrationsOpen, me } from 'mastodon/initial_state';
Expand All @@ -28,6 +29,9 @@ const mapDispatchToProps = (dispatch) => ({
openClosedRegistrationsModal() {
dispatch(openModal({ modalType: 'CLOSED_REGISTRATIONS' }));
},
dispatchServer() {
dispatch(fetchServer());
}
});

class Header extends PureComponent {
Expand All @@ -40,8 +44,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;
Expand Down

0 comments on commit 8d2c268

Please sign in to comment.