From e2eaaa0fbb909153bec52bca0134d71d739289b4 Mon Sep 17 00:00:00 2001 From: Michael Fatemi Date: Tue, 17 Aug 2021 22:12:22 -0400 Subject: [PATCH] add gatekeeper --- src/components/WheelShareLoggedOut.tsx | 9 +++++++-- src/components/gatekeeper.ts | 3 +++ 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 src/components/gatekeeper.ts diff --git a/src/components/WheelShareLoggedOut.tsx b/src/components/WheelShareLoggedOut.tsx index 0453947..eb4c172 100644 --- a/src/components/WheelShareLoggedOut.tsx +++ b/src/components/WheelShareLoggedOut.tsx @@ -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() { WheelShare

To get started, log in with your Ion account.

Log in with Ion -
- Log in with Google + {showGoogleLogin() && ( + <> +
+ Log in with Google + + )}

If you're new to Ion, follow{' '} diff --git a/src/components/gatekeeper.ts b/src/components/gatekeeper.ts new file mode 100644 index 0000000..2f97d70 --- /dev/null +++ b/src/components/gatekeeper.ts @@ -0,0 +1,3 @@ +export function showGoogleLogin() { + return process.env.NODE_ENV === 'development'; +}