07/02/2026

This commit is contained in:
2026-02-07 11:50:23 +07:00
parent 3c18f922b3
commit cb4a4dc482
11 changed files with 250 additions and 386 deletions

View File

@@ -2,7 +2,7 @@ import Link from "next/link";
import { useState, useEffect, useMemo } from "react";
import { VideoData } from "@/data/articles/Video";
export default function Video() {
export default function Video( {item} : any ) {
const { total, list } = VideoData;
const [active, setActive] = useState<number | null>(null);
const [url, setUrl] = useState<string>("");
@@ -31,7 +31,6 @@ export default function Video() {
return null;
}, [url]);
return (list.length > 0 &&
<div className="article-video-container lg:flex flex-wrap gap-4 mt-16">
<div className="lg:w-[732px] video-holder">
@@ -48,14 +47,13 @@ export default function Video() {
<i className="w-[18px] h-[18px] lg:w-6 lg:h-6 lazy bg-no-repeat bg-center bg-[length:100%_100%]"
style={{ backgroundImage: 'url(/images/icon-playlist.png)' }}
/>
<Link href="/video"> Trending video </Link>
<Link href={item[0].url}> Trending video </Link>
</p>
<div className="h-[385px] p-4 pr-1 relative">
<div className="h-full overflow-auto flex flex-col gap-4">
{list.map((item: any) =>
<button
type="button"
<button type="button"
key={item.id}
onClick={() => {
setActive(item.id);