Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
nomad-lab
nomad-FAIR
Commits
8d9744c5
Commit
8d9744c5
authored
Aug 03, 2020
by
Markus Scheidgen
Browse files
Make cookies permanent.
parent
237660c9
Pipeline
#79918
passed with stages
in 48 minutes and 32 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
gui/src/components/App.js
View file @
8d9744c5
...
...
@@ -154,6 +154,7 @@ function Consent() {
const
[
cookies
,
setCookie
]
=
useCookies
()
const
[
accepted
,
setAccepted
]
=
useState
(
cookies
[
'
terms-accepted
'
])
const
[
optOut
,
setOptOut
]
=
useState
(
cookies
[
'
tracking-enabled
'
]
===
'
false
'
)
const
forever
=
new
Date
(
2147483647
*
1000
)
useEffect
(()
=>
{
if
(
!
optOut
)
{
...
...
@@ -165,8 +166,8 @@ function Consent() {
const
handleClosed
=
accepted
=>
{
if
(
accepted
)
{
setCookie
(
'
terms-accepted
'
,
true
)
setCookie
(
'
tracking-enabled
'
,
!
optOut
)
setCookie
(
'
terms-accepted
'
,
true
,
{
expires
:
forever
}
)
setCookie
(
'
tracking-enabled
'
,
!
optOut
,
{
expires
:
forever
}
)
setAccepted
(
true
)
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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