瀏覽代碼

small fix

unknown 3 年之前
父節點
當前提交
5862d03afd
共有 3 個文件被更改,包括 4 次插入5 次删除
  1. 1 1
      .eslintcache
  2. 1 1
      src/App.tsx
  3. 2 3
      src/components/TimerContainer/TimerPresentation/TimerPresentation.tsx

File diff suppressed because it is too large
+ 1 - 1
.eslintcache


+ 1 - 1
src/App.tsx

@@ -17,7 +17,7 @@ function App() {
       <PasswordConfirm min={5} />
       <TimerContainer
         amountMs={4528000}
-        refresh={10}
+        refresh={1000}
         render={TimerPresentation}
       />
       <ToastContainer

+ 2 - 3
src/components/TimerContainer/TimerPresentation/TimerPresentation.tsx

@@ -21,10 +21,9 @@ const TimerPresentation = ({ seconds, refresh }: ITimerPresentationProps) => {
       '[data-second-hand]',
     ) as HTMLDivElement;
     function setClock() {
-      console.log(seconds, seconds / 60, seconds / 60 / 60);
       const secondsRatio = seconds / 60;
-      const minutesRatio = seconds / 60 / 60;
-      const hoursRatio = seconds / 60 / 60 / 12;
+      const minutesRatio = secondsRatio / 60;
+      const hoursRatio = minutesRatio / 12;
       setRotation(secondHand, secondsRatio);
       setRotation(minuteHand, minutesRatio);
       setRotation(hourHand, hoursRatio);