Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
chasse_tresor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Raphaël Faure
chasse_tresor
Commits
782d412d
Commit
782d412d
authored
2 years ago
by
Raphaël Faure
Browse files
Options
Downloads
Patches
Plain Diff
Add cookie
parent
907c6eee
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
client/src/App.js
+6
-4
6 additions, 4 deletions
client/src/App.js
with
6 additions
and
4 deletions
client/src/App.js
+
6
−
4
View file @
782d412d
import
'
./styles/App.css
'
;
import
React
,
{
useState
}
from
"
react
"
;
import
{
useParams
}
from
"
react-router-dom
"
;
import
Connected
from
'
./pages/Connected
'
;
import
{
toast
}
from
"
react-toastify
"
;
import
{
ToastContainer
}
from
"
react-toastify
"
import
'
react-toastify/dist/ReactToastify.css
'
;
import
{
useNavigate
,
useLocation
}
from
"
react-router-dom
"
;
import
{
Cookies
,
useCookies
}
from
'
react-cookie
'
...
...
@@ -17,7 +17,11 @@ function App(props) {
const
{
code
}
=
useParams
();
const
{
search
}
=
useLocation
();
let
url
=
new
URLSearchParams
(
search
)
const
[
cookies
,
setCookie
]
=
useCookies
([
'
once
'
])
let
d
=
new
Date
()
d
.
setTime
(
d
.
getTime
()
+
60
);
setCookie
(
'
is
'
,
'
1
'
,
{
path
:
"
/
"
,
d
});
console
.
log
(
cookies
);
const
onSubmit
=
(
e
)
=>
{
const
tagger
=
{
...
...
@@ -56,8 +60,6 @@ function App(props) {
)
}
}
export
default
App
;
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment