From 7c4b115e7dcb4fd1fe6b4ffddfa144a8f98cfe97 Mon Sep 17 00:00:00 2001 From: Claire Date: Mon, 7 Aug 2023 17:58:29 +0200 Subject: [PATCH] [Glitch] Fix interaction modal layout Port cd6f2b3cbc8dc20c26c6f92f5c0ef3ae906fc2f0 to glitch-soc Signed-off-by: Claire --- .../features/interaction_modal/index.jsx | 47 ++++++------------- .../features/ui/components/sign_in_banner.jsx | 4 +- 2 files changed, 16 insertions(+), 35 deletions(-) diff --git a/app/javascript/flavours/glitch/features/interaction_modal/index.jsx b/app/javascript/flavours/glitch/features/interaction_modal/index.jsx index 67f9cd171..3375afde6 100644 --- a/app/javascript/flavours/glitch/features/interaction_modal/index.jsx +++ b/app/javascript/flavours/glitch/features/interaction_modal/index.jsx @@ -331,36 +331,24 @@ class InteractionModal extends React.PureComponent { } let signupButton; - let signUpOrSignInButton; if (sso_redirect) { - signUpOrSignInButton = ( - - + signupButton = ( + + - ) + ); + } else if (registrationsOpen) { + signupButton = ( + + + + ); } else { - if(registrationsOpen) { - signupButton = ( - - - - ); - } else { - signupButton = ( - - ); - } - - signUpOrSignInButton = ( - <> - - - - {signupButton} - + signupButton = ( + ); } @@ -371,13 +359,6 @@ class InteractionModal extends React.PureComponent {

{actionDescription}

-
-
-

- {signUpOrSignInButton} -
-
-

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 a8e46df8a..82a7fcdb9 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,9 +16,9 @@ const SignInBanner = () => { let signupButton; - const signupUrl = useAppSelector((state) => state.getIn(['server', 'server', 'registrations', 'url'], null) || '/auth/sign_up'); + const signupUrl = useAppSelector((state) => state.getIn(['server', 'server', 'registrations', 'url'], null) || '/auth/sign_up'); - if (sso_redirect) { + if (sso_redirect) { return (