From cd107b054d65a272c60e015f0213f602ea0e53e2 Mon Sep 17 00:00:00 2001 From: Claire Date: Tue, 30 May 2023 19:01:42 +0200 Subject: [PATCH] [Glitch] Fix `null` signUp URL in various places Port 75ebb60ef67ad16dc4b1bfa4684e7ca597e131b3 to glitch-soc Signed-off-by: Claire --- .../flavours/glitch/features/interaction_modal/index.jsx | 2 +- .../flavours/glitch/features/ui/components/sign_in_banner.jsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/javascript/flavours/glitch/features/interaction_modal/index.jsx b/app/javascript/flavours/glitch/features/interaction_modal/index.jsx index db28876476..c9bbecf1af 100644 --- a/app/javascript/flavours/glitch/features/interaction_modal/index.jsx +++ b/app/javascript/flavours/glitch/features/interaction_modal/index.jsx @@ -13,7 +13,7 @@ import { registrationsOpen } from 'flavours/glitch/initial_state'; const mapStateToProps = (state, { accountId }) => ({ 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) => ({ diff --git a/app/javascript/flavours/glitch/features/ui/components/sign_in_banner.jsx b/app/javascript/flavours/glitch/features/ui/components/sign_in_banner.jsx index 31d43af7b1..45e4e89f15 100644 --- a/app/javascript/flavours/glitch/features/ui/components/sign_in_banner.jsx +++ b/app/javascript/flavours/glitch/features/ui/components/sign_in_banner.jsx @@ -16,7 +16,7 @@ const SignInBanner = () => { 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) { signupButton = (