mirror of
https://github.com/myfatemi04/wheelshare-frontend.git
synced 2025-04-09 22:00:16 -04:00
add gatekeeper
This commit is contained in:
parent
ed0bcc8739
commit
e2eaaa0fbb
|
@ -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{' '}
|
||||
|
|
3
src/components/gatekeeper.ts
Normal file
3
src/components/gatekeeper.ts
Normal file
|
@ -0,0 +1,3 @@
|
|||
export function showGoogleLogin() {
|
||||
return process.env.NODE_ENV === 'development';
|
||||
}
|
Loading…
Reference in New Issue
Block a user