Commit a922c1e3 authored by timel's avatar timel

fix: timer

parent 1e202997
...@@ -84,7 +84,10 @@ const LifeBarItem: React.FC<{ ...@@ -84,7 +84,10 @@ const LifeBarItem: React.FC<{
}> = ({ active, name, life, timeLimit, isMe }) => { }> = ({ active, name, life, timeLimit, isMe }) => {
const mm = Math.floor(timeLimit / 60); const mm = Math.floor(timeLimit / 60);
const ss = timeLimit % 60; const ss = timeLimit % 60;
const timeText = `${mm < 10 ? "0" + mm : mm}:${ss < 10 ? "0" + ss : ss}`; const timeText =
timeLimit < 0
? "00:00"
: `${mm < 10 ? "0" + mm : mm}:${ss < 10 ? "0" + ss : ss}`;
return ( return (
<Space <Space
direction="vertical" direction="vertical"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment