update
This commit is contained in:
@@ -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">
|
||||
|
||||
@@ -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,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user