From f19168ec19018165f2a4be911f1532796bb36b5c 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 cae84de47b2d775226d39389a27332730bd0a70a 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 67f9cd1711..3375afde6f 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 a8e46df8a1..82a7fcdb95 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 (