[Glitch] Fix `null` signUp URL in various places
Port 75ebb60ef6
to glitch-soc
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
lolsob-rspec
parent
e7cb0dc83b
commit
cd107b054d
|
@ -13,7 +13,7 @@ import { registrationsOpen } from 'flavours/glitch/initial_state';
|
||||||
|
|
||||||
const mapStateToProps = (state, { accountId }) => ({
|
const mapStateToProps = (state, { accountId }) => ({
|
||||||
displayNameHtml: state.getIn(['accounts', accountId, 'display_name_html']),
|
displayNameHtml: state.getIn(['accounts', accountId, 'display_name_html']),
|
||||||
signupUrl: state.getIn(['server', 'server', 'registrations', 'url'], '/auth/sign_up'),
|
signupUrl: state.getIn(['server', 'server', 'registrations', 'url'], null) || '/auth/sign_up',
|
||||||
});
|
});
|
||||||
|
|
||||||
const mapDispatchToProps = (dispatch) => ({
|
const mapDispatchToProps = (dispatch) => ({
|
||||||
|
|
|
@ -16,7 +16,7 @@ const SignInBanner = () => {
|
||||||
|
|
||||||
let signupButton;
|
let signupButton;
|
||||||
|
|
||||||
const signupUrl = useAppSelector((state) => state.getIn(['server', 'server', 'registrations', 'url'], '/auth/sign_up'));
|
const signupUrl = useAppSelector((state) => state.getIn(['server', 'server', 'registrations', 'url'], null) || '/auth/sign_up');
|
||||||
|
|
||||||
if (registrationsOpen) {
|
if (registrationsOpen) {
|
||||||
signupButton = (
|
signupButton = (
|
||||||
|
|
Loading…
Reference in New Issue