"use client"; import React, { useEffect, useState } from "react"; import Link from "next/link"; import Image from "next/image"; import aydym from "@/public/aydym-com.webp"; import horjun from "@/public/horjun.png"; import belet from "@/public/belet.jpg"; import { v4 } from "uuid"; const PlaylistVideos = ({ id, data }: { id: string; data: any }) => { const [index, setIndex] = useState(0); return (
{data?.data.map( (item: any, i: number) => i !== index && ( ) )}
); }; export default PlaylistVideos; const InfoBlock = ({ data }: { data: any }) => (
{data?.desc ? (

{data.desc}

) : null} {data?.aydym_com_url || data?.horjun_content_url || data?.belet_url ? (

Beýleki platformalarda seret:

{data.aydym_com_url ? (
Aydym.com

Aydym.com

) : null} {data.horjun_content_url ? (
HorjunTv

HorjunTv

) : null} {data.belet_url ? (
BeletTv

BeletFilm

) : null}
) : null}
); const VideoPlayer = ({ content }: { content: any }) => { const [hasWindow, setHasWindow] = useState(false); const [data, setData] = useState(content); useEffect(() => { if (typeof window !== "undefined") { setHasWindow(true); } }, []); useEffect(() => { setData(content); }, [content]); return (
{hasWindow ? ( data?.content_url.endsWith(".mp4") ? (
) : (
{data?.banner_url ? ( {"image"} ) : null}
) ) : null}
); }; const VideoItem = ({ img, title, id, }: { img: any; title: string; id: number; }) => { return (
{img ? ( <>
{title} {"play
) : null} {/* {premium ? : null} */}

{title}

{/* {`${views} Views`} */}
); };