mirror of
https://github.com/supabase/supabase.git
synced 2026-10-06 09:55:06 +03:00
* 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
31 lines
711 B
TypeScript
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>
|
|
)
|
|
}
|