Skip to content

Commit

Permalink
πŸ”Œ (#9) - float number to int
Browse files Browse the repository at this point in the history
  • Loading branch information
KJG04 committed Jun 9, 2022
1 parent 381c88d commit 1605364
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/components/YoutubePlayer/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { useReactiveVar } from "@apollo/client";
import { useRoomContext } from "@hooks";
import { useDeleteContentMutation } from "@queries/content";
import { usePlayTimeMutation } from "@queries/room";
import { useDeleteContentMutation, usePlayTimeMutation } from "@queries";
import { durationVar, forcePlayTimeVar, playTimeVar } from "@stores";
import { Content } from "@types";
import { FC, useCallback, useEffect, useRef, useState } from "react";
Expand Down Expand Up @@ -83,7 +82,7 @@ const YoutubePlayer: FC<PropsType> = (props) => {
if (ref.current) {
const cur = await ref.current.internalPlayer.getCurrentTime();

const milli = cur * 1000;
const milli = Math.floor(cur * 1000);

playTimeMutate({
variables: { roomCode: room.code, playTime: milli, force: false },
Expand Down

0 comments on commit 1605364

Please sign in to comment.