This commit is contained in:
2025-08-18 20:26:45 +05:30
parent 46f24c10fe
commit b92128c825
2 changed files with 4 additions and 3 deletions

View File

@@ -17,6 +17,7 @@ export default function PosterAdCenterBottom({
const totalBottomAds = bads?.length;
const [currentTopAdIndex, setCurrentTopAdIndex] = useState(0);
const [currentBottomAdIndex, setCurrentBottomAdIndex] = useState(0);
console.log('tads', tads, bads)
return (
<div className="col-span-8 flex flex-col gap-5">

View File

@@ -36,7 +36,7 @@ export default function Home() {
combine(result) {
// console.log("Combined Result:", result);
const [lineAds, videoAds, posterAds] = result;
const filteredPosterAds = posterAds.data?.filter((ad: PosterAd) => {
return (
ad.position?.side !== "CENTER_BOTTOM" &&
@@ -48,11 +48,11 @@ export default function Home() {
filteredPosterAds: filteredPosterAds || [],
videoAds: videoAds.data || [],
centerBottomPosterAd:
posterAds.data?.find(
posterAds.data?.filter(
(ad: PosterAd) => ad.position?.side === "CENTER_BOTTOM"
) || null,
centerTopPosterAd:
posterAds.data?.find(
posterAds.data?.filter(
(ad: PosterAd) => ad.position?.side === "CENTER_TOP"
) || null,
};