diff --git a/src/components/categorycard/CategoryCard.jsx b/src/components/categorycard/CategoryCard.jsx
index 72f6668..18481c5 100644
--- a/src/components/categorycard/CategoryCard.jsx
+++ b/src/components/categorycard/CategoryCard.jsx
@@ -9,8 +9,6 @@ import { FaChevronRight } from "react-icons/fa";
import "./CategoryCard.css";
import { useLanguage } from "@/src/context/LanguageContext";
import { Link, useNavigate } from "react-router-dom";
-import Qtip from "../qtip/Qtip";
-import useToolTipPosition from "@/src/hooks/useToolTipPosition";
const CategoryCard = React.memo(
({
@@ -25,7 +23,7 @@ const CategoryCard = React.memo(
}) => {
const { language } = useLanguage();
const navigate = useNavigate();
- const [showPlay, setShowPlay] = useState(false);
+
if (limit) {
data = data.slice(0, limit);
}
@@ -69,22 +67,7 @@ const CategoryCard = React.memo(
window.removeEventListener("resize", handleResize);
};
}, [getItemsToRender]);
- const [hoveredItem, setHoveredItem] = useState(null);
- const [hoverTimeout, setHoverTimeout] = useState(null);
- const { tooltipPosition, tooltipHorizontalPosition, cardRefs } =
- useToolTipPosition(hoveredItem, data);
- const handleMouseEnter = (item, index) => {
- const timeout = setTimeout(() => {
- setHoveredItem(item.id + index);
- setShowPlay(true);
- }, 400);
- setHoverTimeout(timeout);
- };
- const handleMouseLeave = () => {
- clearTimeout(hoverTimeout);
- setHoveredItem(null);
- setShowPlay(false);
- };
+
return (
@@ -118,86 +101,69 @@ const CategoryCard = React.memo(
key={index}
className="flex flex-col category-card-container"
style={{ height: "fit-content" }}
- ref={(el) => (cardRefs.current[index] = el)}
>
-
- navigate(
- `${
- path === "top-upcoming"
- ? `/${item.id}`
- : `/watch/${item.id}`
- }`
- )
- }
- onMouseEnter={() => handleMouseEnter(item, index)}
- onMouseLeave={handleMouseLeave}
- >
- {hoveredItem === item.id + index && showPlay && (
-
- )}
-
-
+
+
+ navigate(
+ `${
+ path === "top-upcoming"
+ ? `/${item.id}`
+ : `/watch/${item.id}`
+ }`
+ )
+ }
+ >

+
{(item.tvInfo?.rating === "18+" ||
item?.adultContent === true) && (
-
+
18+
)}
-
-
+
+
{item.tvInfo?.sub && (
-
+
)}
{item.tvInfo?.dub && (
-
+
)}
- {item.tvInfo?.eps && (
-
-
- {item.tvInfo.eps}
-
-
- )}
-
-
- {language === "EN" ? item.title : item.japanese_title}
-
-
-
+
{item.tvInfo.showType.split(" ").shift()}
-
-
+
+
{item.tvInfo?.duration === "m" ||
item.tvInfo?.duration === "?" ||
item.duration === "m" ||
@@ -207,19 +173,13 @@ const CategoryCard = React.memo(
- {hoveredItem === item.id + index &&
- window.innerWidth > 1024 && (
-
-
-
- )}
+
+ {language === "EN" ? item.title : item.japanese_title}
+
{item.description && (
{item.description}
@@ -235,99 +195,85 @@ const CategoryCard = React.memo(
key={index}
className="flex flex-col transition-transform duration-300 ease-in-out"
style={{ height: "fit-content" }}
- ref={(el) => (cardRefs.current[index] = el)}
>
-
- navigate(
- `${
- path === "top-upcoming"
- ? `/${item.id}`
- : `/watch/${item.id}`
- }`
- )
- }
- onMouseEnter={() => handleMouseEnter(item, index)}
- onMouseLeave={handleMouseLeave}
- >
- {hoveredItem === item.id + index && showPlay && (
-
- )}
-
-
+
+
+ navigate(
+ `${
+ path === "top-upcoming"
+ ? `/${item.id}`
+ : `/watch/${item.id}`
+ }`
+ )
+ }
+ >

+
{(item.tvInfo?.rating === "18+" ||
item?.adultContent === true) && (
-
+
18+
)}
-
- {item.tvInfo?.sub && (
-
-
-
- {item.tvInfo.sub}
-
+
+
+ {item.tvInfo?.sub && (
+
+
+
+ {item.tvInfo.sub}
+
+
+ )}
+ {item.tvInfo?.dub && (
+
+
+
+ {item.tvInfo.dub}
+
+
+ )}
+
+ {item.tvInfo.showType.split(" ").shift()}
- )}
- {item.tvInfo?.dub && (
-
-
-
- {item.tvInfo.dub}
-
+
+
+ {item.tvInfo?.duration === "m" ||
+ item.tvInfo?.duration === "?" ||
+ item.duration === "m" ||
+ item.duration === "?"
+ ? "N/A"
+ : item.tvInfo?.duration || item.duration || "N/A"}
- )}
+
- {hoveredItem === item.id + index &&
- window.innerWidth > 1024 && (
-
-
-
- )}
{language === "EN" ? item.title : item.japanese_title}
-
-
- {item.tvInfo.showType.split(" ").shift()}
-
-
-
- {item.tvInfo?.duration === "m" ||
- item.tvInfo?.duration === "?" ||
- item.duration === "m" ||
- item.duration === "?"
- ? "N/A"
- : item.tvInfo?.duration || item.duration || "N/A"}
-
-
))}