Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
W
WhenMeet
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
websystem2023-2
WhenMeet
Compare revisions
9fd426644ec067b5971d0d5cd24c73bf30f92173 to 36b2f21bff73d11a7e1a60c13a370569b13a1220
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
websystem2023-2/whenmeet
Select target project
No results found
36b2f21bff73d11a7e1a60c13a370569b13a1220
Select Git revision
Branches
main
Swap
Target
websystem2023-2/whenmeet
Select target project
websystem2023-2/whenmeet
1 result
9fd426644ec067b5971d0d5cd24c73bf30f92173
Select Git revision
Branches
main
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (2)
[EDIT] /result 페이지 남은 시간 계산 로직 수정
· 715cfcba
준현 강
authored
1 year ago
715cfcba
Merge branch 'main' of
https://git.ajou.ac.kr/websystem2023-2/whenmeet
· 36b2f21b
준현 강
authored
1 year ago
36b2f21b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
react-whenMeet/src/components/ResultMakeForm.js
+11
-13
11 additions, 13 deletions
react-whenMeet/src/components/ResultMakeForm.js
with
11 additions
and
13 deletions
react-whenMeet/src/components/ResultMakeForm.js
View file @
36b2f21b
...
...
@@ -108,22 +108,20 @@ function ResultMakeForm() {
}
const
voteExpiresKST
=
new
Date
(
meetingData
.
voteExpiresAt
);
const
now
=
new
Date
();
const
nowKST
=
new
Date
(
now
.
getTime
()
+
9
*
60
*
60
*
1000
);
// UTC 시간에 9시간을 더해 KST로 조정
const
nowKST
=
new
Date
(
now
.
getTime
());
// UTC 시간에 9시간을 더해 KST로 조정
const
difference
=
voteExpiresKST
-
nowKST
;
if
(
difference
>
0
)
{
return
{
days
:
Math
.
floor
(
difference
/
(
1000
*
60
*
60
*
24
)),
hours
:
Math
.
floor
((
difference
/
(
1000
*
60
*
60
))
%
24
),
minutes
:
Math
.
floor
((
difference
/
1000
/
60
)
%
60
),
seconds
:
Math
.
floor
((
difference
/
1000
)
%
60
),
};
}
else
{
if
(
difference
<=
0
)
{
navigate
(
`/resultend/
${
meeting_id
}
`
);
return
{
days
:
0
,
hours
:
0
,
minutes
:
0
,
seconds
:
0
};
}
return
{
days
:
Math
.
floor
(
difference
/
(
1000
*
60
*
60
*
24
)),
hours
:
Math
.
floor
((
difference
/
(
1000
*
60
*
60
))
%
24
),
minutes
:
Math
.
floor
((
difference
/
1000
/
60
)
%
60
),
seconds
:
Math
.
floor
((
difference
/
1000
)
%
60
),
};
};
const
updateTimer
=
()
=>
{
...
...
@@ -138,7 +136,7 @@ function ResultMakeForm() {
const
timerId
=
setInterval
(
updateTimer
,
1000
);
return
()
=>
clearInterval
(
timerId
);
},
[
meetingData
]);
},
[
meetingData
,
navigate
,
meeting_id
]);
const
handleEdit
=
async
()
=>
{
try
{
...
...
This diff is collapsed.
Click to expand it.