Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
account-app
Manage
Activity
Members
Labels
Plan
Issues
9
Issue boards
Milestones
Wiki
Code
Merge requests
4
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
rc
account-app
Commits
34b9d27a
Commit
34b9d27a
authored
4 years ago
by
Bo-Chun Chen
Browse files
Options
Downloads
Patches
Plain Diff
Unset timer when time go to minus
parent
28f38b8b
No related branches found
No related tags found
2 merge requests
!16
WIP: Feat React frontend
,
!3
Feat update ui
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
react/src/components/Main.jsx
+4
-1
4 additions, 1 deletion
react/src/components/Main.jsx
with
4 additions
and
1 deletion
react/src/components/Main.jsx
+
4
−
1
View file @
34b9d27a
...
@@ -69,10 +69,13 @@ function Main(props) {
...
@@ -69,10 +69,13 @@ function Main(props) {
socket
.
on
(
'
created
'
,
data
=>
{
socket
.
on
(
'
created
'
,
data
=>
{
if
(
DEBUG
)
console
.
log
(
'
account has been created.
'
)
if
(
DEBUG
)
console
.
log
(
'
account has been created.
'
)
let
sec
=
3
;
let
sec
=
3
;
let
myTimer
;
(
function
countdown
()
{
(
function
countdown
()
{
setModalTitle
(
"
Your account is ready!
"
);
setModalTitle
(
"
Your account is ready!
"
);
setModalBody
(
`Will redirect in
${
sec
--
}
seconds.`
);
setModalBody
(
`Will redirect in
${
sec
--
}
seconds.`
);
setTimeout
(
countdown
,
1000
);
myTimer
=
setTimeout
(
countdown
,
1000
);
if
(
sec
<
0
)
clearTimeout
(
myTimer
);
})()
})()
setTimeout
(()
=>
{
setTimeout
(()
=>
{
if
(
DEBUG
)
console
.
log
(
'
Redirecting to /test
'
)
if
(
DEBUG
)
console
.
log
(
'
Redirecting to /test
'
)
...
...
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