fix: Para floating on signin page when guest signin not enabled

This commit is contained in:
Tom Moor
2019-12-15 20:59:36 -08:00
parent c360d7cd8c
commit 671fa9cc84

View File

@ -34,7 +34,7 @@ function SubdomainSignin({
slackSigninEnabled = !!team.slackId && slackSigninEnabled; slackSigninEnabled = !!team.slackId && slackSigninEnabled;
const guestSigninEnabled = team.guestSignin; const guestSigninEnabled = team.guestSignin;
const guestSigninForm = guestSigninEnabled && ( const guestSigninForm = (
<div> <div>
<form method="POST" action="/auth/email"> <form method="POST" action="/auth/email">
<EmailInput type="email" name="email" placeholder="jane@domain.com" />{' '} <EmailInput type="email" name="email" placeholder="jane@domain.com" />{' '}
@ -56,7 +56,7 @@ function SubdomainSignin({
<Hero> <Hero>
<h1>{lastSignedIn ? 'Welcome back,' : 'Hey there,'}</h1> <h1>{lastSignedIn ? 'Welcome back,' : 'Hey there,'}</h1>
<AuthNotices notice={notice} /> <AuthNotices notice={notice} />
{guest ? ( {guest && guestSigninEnabled ? (
<React.Fragment> <React.Fragment>
<HeroText> <HeroText>
Sign in with your email address to continue to {team.name}. Sign in with your email address to continue to {team.name}.
@ -88,8 +88,12 @@ function SubdomainSignin({
/> />
</p> </p>
<HeroText>Have a guest account? Sign in with email</HeroText> {guestSigninEnabled && (
{guestSigninForm} <React.Fragment>
<HeroText>Have a guest account? Sign in with email</HeroText>
{guestSigninForm}
</React.Fragment>
)}
</React.Fragment> </React.Fragment>
)} )}
</Hero> </Hero>