From cd6f2b3cbc8dc20c26c6f92f5c0ef3ae906fc2f0 Mon Sep 17 00:00:00 2001 From: Claire Date: Mon, 7 Aug 2023 17:58:29 +0200 Subject: [PATCH] Fix interaction modal layout (#26368) --- .../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/mastodon/features/interaction_modal/index.jsx b/app/javascript/mastodon/features/interaction_modal/index.jsx index a8b86b721..220719a94 100644 --- a/app/javascript/mastodon/features/interaction_modal/index.jsx +++ b/app/javascript/mastodon/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/mastodon/features/ui/components/sign_in_banner.jsx b/app/javascript/mastodon/features/ui/components/sign_in_banner.jsx index db85c6cbf..d5f0c00dc 100644 --- a/app/javascript/mastodon/features/ui/components/sign_in_banner.jsx +++ b/app/javascript/mastodon/features/ui/components/sign_in_banner.jsx @@ -17,9 +17,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 (