Commit 6f2b7535 authored by Stefan Probst's avatar Stefan Probst
Browse files

chore: disable sign in on prod deploy

parent 7a503edc
Pipeline #172269 canceled with stage
in 2 minutes and 5 seconds
......@@ -6,3 +6,4 @@ NEXT_PUBLIC_SSHOC_API_BASE_URL=https://sshoc-marketplace-api.acdh-dev.oeaw.ac.at
# NEXT_PUBLIC_RECAPTCHA_SITE_KEY=
NEXT_PUBLIC_MATOMO_BASE_URL=https://matomo.acdh.oeaw.ac.at/
NEXT_PUBLIC_MATOMO_SITE_ID=179
NEXT_PUBLIC_PRODUCTION_DEPLOY=1
......@@ -62,6 +62,7 @@ package:frontend:main:acdh:
NEXT_PUBLIC_SSHOC_BASE_URL: https://sshoc-marketplace.acdh-dev.oeaw.ac.at
NEXT_PUBLIC_SSHOC_API_BASE_URL: https://sshoc-marketplace-api.acdh-dev.oeaw.ac.at
# NEXT_PUBLIC_RECAPTCHA_SITE_KEY:
NEXT_PUBLIC_PRODUCTION_DEPLOY: 0
rules:
- if: '$CI_COMMIT_BRANCH == "main"'
......@@ -81,5 +82,6 @@ package:frontend:tags:acdh:
# NEXT_PUBLIC_RECAPTCHA_SITE_KEY:
NEXT_PUBLIC_MATOMO_BASE_URL: https://matomo.acdh.oeaw.ac.at/
NEXT_PUBLIC_MATOMO_SITE_ID: 179
NEXT_PUBLIC_PRODUCTION_DEPLOY: 1
rules:
- if: '$CI_COMMIT_TAG != null'
......@@ -200,7 +200,7 @@ function ReportAnIssueButton({
},
}}
>
<a>Report an issue</a>
<a className="mx-6 my-2">Report an issue</a>
</Link>
)
}
......@@ -293,14 +293,17 @@ function AuthButton() {
return (
<div className="relative flex items-center space-x-6 text-gray-500">
<ReportAnIssueButton path={router.asPath} />
<NavLinkButton
href={{
pathname: '/auth/sign-in',
query: redirectPath !== undefined ? { from: redirectPath } : {},
}}
>
Sign in
</NavLinkButton>
{/* Disable login on production deploy. */}
{process.env.NEXT_PUBLIC_PRODUCTION_DEPLOY !== '1' ? (
<NavLinkButton
href={{
pathname: '/auth/sign-in',
query: redirectPath !== undefined ? { from: redirectPath } : {},
}}
>
Sign in
</NavLinkButton>
) : null}
</div>
)
}
......
......@@ -4,5 +4,10 @@ import SignInScreen from '@/screens/auth/SignInScreen'
* Sign in page.
*/
export default function SignInPage(): JSX.Element {
return <SignInScreen />
/* Disable login on production deploy. */
return process.env.NEXT_PUBLIC_PRODUCTION_DEPLOY !== '1' ? (
<SignInScreen />
) : (
<div />
)
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment