07/02/2026
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user