File tree Expand file tree Collapse file tree
app/(main)/(podcast)/podcast/[slug] Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ import PlayerPlayButton from "@/components/player-play-button";
2121import PodcastOpenSpotify from "@/components/podcast-open-spotify" ;
2222import PodcastOpenApple from "@/components/podcast-open-apple" ;
2323import PodcastOpenYouTube from "@/components/podcast-open-youtube" ;
24+ import CarbonAdBanner from "@/components/carbon-ad-banner" ;
2425
2526type Props = {
2627 params : { slug : string } ;
@@ -124,7 +125,7 @@ export default async function PodcastPage({ params }: Props) {
124125 </ div >
125126 ) }
126127 </ div >
127- { podcast ?. sponsor ?. length && (
128+ { podcast ?. sponsor ?. length ? (
128129 < section className = "flex flex-col mt-10 mb-10" >
129130 < h2 className = "mb-4 text-2xl font-bold" > Sponsors</ h2 >
130131 < hr className = "border-accent-2" />
@@ -133,6 +134,8 @@ export default async function PodcastPage({ params }: Props) {
133134 </ div >
134135 < hr className = "border-accent-2" />
135136 </ section >
137+ ) : (
138+ < CarbonAdBanner />
136139 ) }
137140 { podcast ?. content ?. length && (
138141 < PortableText
Original file line number Diff line number Diff line change @@ -12,5 +12,16 @@ export default function CarbonAdBanner() {
1212 s . src = `//cdn.carbonads.com/carbon.js?serve=CW7DCKJJ&placement=codingcatdev&format=cover` ;
1313 reference . current . appendChild ( s ) ;
1414 } , [ ] ) ;
15- return < div className = "flex justify-center my-2" ref = { reference } /> ;
15+ return (
16+ < section className = "flex flex-col mt-10 mb-10" >
17+ < h2 className = "mb-4 text-2xl font-bold" > Ads</ h2 >
18+ < hr className = "border-accent-2" />
19+ < div className = "my-12 " >
20+ < div className = "p-4 grid gap-6 md:p-6 grid-flow-col auto-cols-[1fr]" >
21+ < div className = "flex justify-center my-2" ref = { reference } />
22+ </ div >
23+ </ div >
24+ < hr className = "border-accent-2" />
25+ </ section >
26+ )
1627}
You can’t perform that action at this time.
0 commit comments