Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SSHOC
sshoc-marketplace-frontend
Commits
6f2b7535
Commit
6f2b7535
authored
Feb 05, 2021
by
Stefan Probst
Browse files
chore: disable sign in on prod deploy
parent
7a503edc
Pipeline
#172269
canceled with stage
in 2 minutes and 5 seconds
Changes
4
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
.env
View file @
6f2b7535
...
...
@@ -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
.gitlab-ci.yml
View file @
6f2b7535
...
...
@@ -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'
src/modules/page/PageHeader.tsx
View file @
6f2b7535
...
...
@@ -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
>
)
}
...
...
src/pages/auth/sign-in.tsx
View file @
6f2b7535
...
...
@@ -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
/>
)
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment