@@ -45,25 +45,41 @@ function plainTextFromPortableText(value: any): string {
4545
4646const query = groq `
4747 *[_type=="post" && slug.current==$slug][0]{
48+ <<<<<<< HEAD
4849 _id,
4950 "title": coalesce(title[$locale], title[lower($locale)], title.uk, title.en, title.pl, title),
51+ =======
52+ "title": coalesce(title[$locale], title.en, title),
53+ >>>>>>> develop
5054 publishedAt,
5155 "mainImage": mainImage.asset->url,
5256 "categories": categories[]->title,
5357 tags,
5458 resourceLink,
5559
5660 "author": author->{
61+ <<<<<<< HEAD
5762 "name": coalesce(name[$locale], name[lower($locale)], name.uk, name.en, name.pl, name),
5863 "company": coalesce(company[$locale], company[lower($locale)], company.uk, company.en, company.pl, company),
5964 "jobTitle": coalesce(jobTitle[$locale], jobTitle[lower($locale)], jobTitle.uk, jobTitle.en, jobTitle.pl, jobTitle),
6065 "city": coalesce(city[$locale], city[lower($locale)], city.uk, city.en, city.pl, city),
6166 "bio": coalesce(bio[$locale], bio[lower($locale)], bio.uk, bio.en, bio.pl, bio),
67+ =======
68+ "name": coalesce(name[$locale], name.en, name),
69+ "company": coalesce(company[$locale], company.en, company),
70+ "jobTitle": coalesce(jobTitle[$locale], jobTitle.en, jobTitle),
71+ "city": coalesce(city[$locale], city.en, city),
72+ "bio": coalesce(bio[$locale], bio.en, bio),
73+ >>>>>>> develop
6274 "image": image.asset->url,
6375 socialMedia[]{ _key, platform, url }
6476 },
6577
78+ <<<<<<< HEAD
6679 "body": coalesce(body[$locale], body[lower($locale)], body.uk, body.en, body.pl, body)[]{
80+ =======
81+ "body": coalesce(body[$locale], body.en, body)[]{
82+ >>>>>>> develop
6783 ...,
6884 _type == "image" => {
6985 ...,
@@ -101,13 +117,16 @@ export default async function PostDetails({
101117 slug : slugParam ,
102118 locale,
103119 } ) ;
120+ < < << << < HEAD
104121 const recommendedAll : Post [ ] = await client . fetch ( recommendedQuery , {
105122 slug : slugParam ,
106123 locale,
107124 } ) ;
108125 const recommendedPosts = recommendedAll
109126 . sort ( ( ) => Math . random ( ) - 0.5 )
110127 . slice ( 0 , 3 ) ;
128+ = === ===
129+ >>> >>> > develop
111130
112131 if ( ! post ?. title ) return notFound ( ) ;
113132
@@ -249,9 +268,45 @@ export default async function PostDetails({
249268 </ >
250269 ) }
251270
271+ < < << << < HEAD
252272 { post . resourceLink && null }
253273
254274 { ( authorBio || authorName || authorMeta ) && null }
275+ = === ===
276+ { ( authorBio || authorName || authorMeta ) && (
277+ < section className = "mt-12 p-6 rounded-2xl border border-gray-200 bg-white" >
278+ < h2 className = "text-lg font-semibold" > { t ( 'aboutAuthor' ) } </ h2 >
279+ < div className = "mt-4 flex items-start gap-4" >
280+ { post . author ?. image && (
281+ < div className = "relative w-14 h-14 shrink-0" >
282+ < Image
283+ src = { post . author . image }
284+ alt = { authorName || 'Author' }
285+ fill
286+ className = "rounded-full object-cover border border-gray-200"
287+ />
288+ </ div >
289+ ) }
290+
291+ < div className = "min-w-0" >
292+ { authorName && (
293+ < p className = "text-sm font-semibold text-gray-900" >
294+ { authorName }
295+ </ p >
296+ ) }
297+ { authorMeta && (
298+ < p className = "mt-1 text-sm text-gray-600" > { authorMeta } </ p >
299+ ) }
300+ { authorBio && (
301+ < p className = "mt-3 text-sm text-gray-700 whitespace-pre-line leading-relaxed" >
302+ { authorBio }
303+ </ p >
304+ ) }
305+ </ div >
306+ </ div >
307+ </ section >
308+ ) }
309+ > >>> >>> develop
255310 </ main >
256311 );
257312}
0 commit comments