Skip to content

Commit 30a34c5

Browse files
author
Naomi Trevino
authored
Merge pull request #427 from NEU-DSG/refine-login-button-conditional-display
Refine-login-button-conditional-display
2 parents 38b799e + 9583286 commit 30a34c5

2 files changed

Lines changed: 8 additions & 5 deletions

File tree

website/src/layout.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,7 @@ const Layout: React.FC = ({ children }) => {
4343
Digital Archive of Indigenous Language Persistence
4444
</span>
4545
</div>
46-
47-
{deploymentEnvironment !== Environment.Production && (
48-
<LoginHeaderButton />
49-
)}
50-
46+
<LoginHeaderButton />
5147
<HeaderPrefDrawer />
5248
</div>
5349
<NavMenu menuID={2} />

website/src/pages/auth/user-auth-layout.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import {
1111
import { useCredentials, useUser } from "src/auth"
1212
import { Button, CleanButton, Link } from "src/components"
1313
import { AccountMenu } from "src/components/authenticated-users/account-menu"
14+
import { Environment, deploymentEnvironment } from "src/env"
1415
import { centeredColumn } from "src/style/utils.css"
1516
import Layout from "../../layout"
1617
import {
@@ -43,6 +44,12 @@ export const UserAuthPageTemplate = (props: {
4344

4445
// the login button that appears in the header of the website
4546
export const LoginHeaderButton = (props?: { className?: string }) => {
47+
// hide the login button on production while development of DAILP TI is ongoing
48+
// FIXME remove this flag when DAILP TI launches in a stable form
49+
if (deploymentEnvironment === Environment.Production) {
50+
return null
51+
}
52+
4653
// get the current user's auth token
4754
const token = useCredentials()
4855

0 commit comments

Comments
 (0)