Files
supabase/apps/www/components/Avatar.tsx
Francesco Sansalvadore 2feda5ee19 cms www blog (#38045)
* show cms blog posts in www
* remove contentlayer from www
* outputFileTracingExcludes
* update remotePatterns
* fetch cms posts server-side with revalidation
* add cms env vars to turbo.json
* add www env vars to turbo.json
* include cms posts in www sitemap
* add migration to remove image from cms post
* update cms meta image mapping in www
2025-09-03 14:49:28 +02:00

31 lines
711 B
TypeScript

import Image from 'next/image'
interface Props {
caption: string
img: string
}
export default function Avatar(props: Props) {
const { caption, img } = props
const imageUrl = img.startsWith('http') ? img : '/images/blog/avatars/' + img
return (
<div className="align-center m-0 flex h-8 items-center gap-3">
<Image
src={imageUrl}
className="h-8 w-8 rounded-full object-cover text-center m-0"
alt={`${caption} avatar`}
width={32}
height={32}
/>
<figcaption
style={{ marginTop: 0 }}
className="text-foreground-lighter font-normal not-italic not-prose"
>
<p>{caption}</p>
</figcaption>
</div>
)
}