@@ -20,6 +20,7 @@ import Buy from "@/components/user-buy";
2020import Link from "next/link" ;
2121import ShowPro from "./show-pro" ;
2222import UserGoProButton from "@/components/user-go-pro-button" ;
23+ import CarbonAdBanner from "@/components/carbon-ad-banner" ;
2324
2425type Props = {
2526 params : { courseSlug : string } ;
@@ -67,65 +68,45 @@ export default async function CoursePage({ params }: Props) {
6768 < ShowPro />
6869 < BreadcrumbLinks
6970 links = { [
70- { title : "Courses" , href : "/courses/page/1" } ,
71- { title : course . title } ,
71+ { title : "Courses" , href : "/courses/page/1" }
7272 ] }
7373 />
7474 < article >
7575 < h1 className = "mb-12 text-4xl font-bold leading-tight tracking-tighter text-balance md:text-7xl md:leading-none lg:text-8xl" >
7676 { course . title }
7777 </ h1 >
78- < div className = "hidden md:mb-12 md:block" >
79- < div className = "flex flex-col gap-8" >
80- { course ?. author && (
81- < div className = "flex" >
82- { course . author . map ( ( a ) => (
83- < Avatar
84- key = { a . _id }
85- href = { `/author/${ a ?. slug } ` }
86- name = { a . title }
87- coverImage = { a ?. coverImage }
88- />
89- ) ) }
90- </ div >
91- ) }
92- < div className = "text-lg" >
93- < DateComponent dateString = { course . date } />
94- </ div >
95- </ div >
96- </ div >
9778 < div className = "mb-8 sm:mx-0 md:mb-16 flex flex-col gap-2 md:gap-8" >
9879 < CoverMedia
9980 cloudinaryImage = { course . coverImage }
10081 cloudinaryVideo = { course . videoCloudinary }
10182 youtube = { course . youtube }
10283 />
103- { course ?. stripeProduct && course ?. title && (
104- < section className = "flex gap-2" >
105- < Buy stripeProduct = { course . stripeProduct } title = { course . title } />
106- < UserGoProButton />
107- </ section >
108- ) }
109- </ div >
110- < div className = "block md:hidden" >
111- < div className = "max-w-2xl mx-auto" >
112- < div className = "mb-6" >
113- { course . author && (
114- < div className = "flex" >
115- { course . author . map ( ( a ) => (
116- < Avatar
117- key = { a . _id }
118- href = { `/author/${ a ?. slug } ` }
119- name = { a . title }
120- coverImage = { a ?. coverImage }
121- />
122- ) ) }
123- </ div >
124- ) }
125- </ div >
126- < div className = "mb-4 text-lg" >
127- < DateComponent dateString = { course . date } />
84+ < div className = "flex justify-between" >
85+ < div className = "max-w-2xl" >
86+ < div className = "mb-6" >
87+ { course . author && (
88+ < div className = "flex" >
89+ { course . author . map ( ( a ) => (
90+ < Avatar
91+ key = { a . _id }
92+ href = { `/author/${ a ?. slug } ` }
93+ name = { a . title }
94+ coverImage = { a ?. coverImage }
95+ />
96+ ) ) }
97+ </ div >
98+ ) }
99+ </ div >
100+ < div className = "mb-4 text-lg" >
101+ < DateComponent dateString = { course . date } />
102+ </ div >
128103 </ div >
104+ { course ?. stripeProduct && course ?. title && (
105+ < section className = "flex gap-2" >
106+ < Buy stripeProduct = { course . stripeProduct } title = { course . title } />
107+ < UserGoProButton />
108+ </ section >
109+ ) }
129110 </ div >
130111 </ div >
131112 { course . content ?. length && (
@@ -134,6 +115,9 @@ export default async function CoursePage({ params }: Props) {
134115 value = { course . content as PortableTextBlock [ ] }
135116 />
136117 ) }
118+ < div className = "p-8 flex justify-end" >
119+ < CarbonAdBanner />
120+ </ div >
137121 </ article >
138122 < Suspense >
139123 < Lessons courseSlug = { params . courseSlug } />
0 commit comments