add gatekeeper

This commit is contained in:
Michael Fatemi 2021-08-17 22:12:22 -04:00
parent ed0bcc8739
commit e2eaaa0fbb
2 changed files with 10 additions and 2 deletions

View File

@ -2,6 +2,7 @@ import {
googleAuthorizationEndpoint,
ionAuthorizationEndpoint,
} from './Authentication/authorizationEndpoint';
import { showGoogleLogin } from './gatekeeper';
import UILink from './UI/UILink';
import UIPrimaryTitle from './UI/UIPrimaryTitle';
@ -11,8 +12,12 @@ export default function WheelShareLoggedOut() {
<UIPrimaryTitle>WheelShare</UIPrimaryTitle>
<p>To get started, log in with your Ion account.</p>
<UILink href={ionAuthorizationEndpoint}>Log in with Ion</UILink>
<br />
<UILink href={googleAuthorizationEndpoint}>Log in with Google</UILink>
{showGoogleLogin() && (
<>
<br />
<UILink href={googleAuthorizationEndpoint}>Log in with Google</UILink>
</>
)}
<br />
<p>
If you're new to Ion, follow{' '}

View File

@ -0,0 +1,3 @@
export function showGoogleLogin() {
return process.env.NODE_ENV === 'development';
}