import React from "react"; import { useNavigate } from "react-router-dom"; import "../pages/feed.css"; import { useSelector } from "react-redux"; function VideoCard(props) { const pageRoute = useNavigate(); const { darkMode } = useSelector((state) => state.darkMode); return (
pageRoute(`/watch/${props.videoId}`)} className="md:w-56 lg:w-72 rounded-[12px] videoImage" src={props.thumbnail} />

pageRoute(`/watch/${props.videoId}`)} className={`text-[14px] lg:text-[16px] font-semibold leading-[20px] w-[94%] ${ darkMode && "text-black" }`} > {props.title?.slice(0, 60)}

pageRoute(`/channel/${props.channelId}`)} className="text-[11.5px] text-[#606060] lg:text-[13.5px] font-[500] tracking-wide" > {props.channel}

pageRoute(`/watch/${props.videoId}`)} className="text-[11.5px] text-[#606060] lg:text-[13.5px] font-medium tracking-wider -mt-1" > {props.on}

); } export default VideoCard;