From 5e876c2901e11b29b36aeaa9e690cafd1a8c574c 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 14bb6bb29a49f151c8a6c379e5d2ddb663f8e923 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 = (