From 0126b524904e5041e7c11ccdd6ec6b49498e6dc6 Mon Sep 17 00:00:00 2001 From: Cooper Ransom Date: Thu, 21 Mar 2024 18:54:34 -0400 Subject: [PATCH] Fix dumb mistake --- .../player/atoms/NextEpisodeButton.tsx | 24 +------------------ 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/src/components/player/atoms/NextEpisodeButton.tsx b/src/components/player/atoms/NextEpisodeButton.tsx index f36c18e6..fdd16aff 100644 --- a/src/components/player/atoms/NextEpisodeButton.tsx +++ b/src/components/player/atoms/NextEpisodeButton.tsx @@ -1,5 +1,5 @@ import classNames from "classnames"; -import React, { useState, useEffect, useCallback } from "react"; +import React, { useCallback, useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; import { Icon, Icons } from "@/components/Icon"; @@ -19,11 +19,6 @@ function shouldShowNextEpisodeButton( return "none"; } -function shouldStartCountdown(time: number, duration: number): boolean { - const secondsFromEnd = duration - time; - return secondsFromEnd <= 30 || time / duration >= 0.93; -} - function Button(props: { className: string; onClick?: () => void; @@ -113,23 +108,6 @@ export function NextEpisodeButton(props: { if (!meta?.episode || !nextEp) return null; if (metaType !== "show") return null; - const [seconds, setSeconds] = useState(15); - - useEffect(() => { - const interval = setInterval(() => { - setSeconds((prevSeconds) => prevSeconds - 1); - }, 1000); - - return () => clearInterval(interval); - }, []); - - useEffect(() => { - if (seconds === 0) { - loadNextEpisode(); - setSeconds(15); - } - }, [seconds, loadNextEpisode]); - return (