grain.social is a photo sharing platform built on atproto.
1import { GalleryView } from "$lexicon/types/social/grain/gallery/defs.ts";
2import { ActorInfo } from "./ActorInfo.tsx";
3import { CameraBadges } from "./CameraBadges.tsx";
4import { RenderFacetedText } from "./RenderFacetedText.tsx";
5
6export function GalleryInfo(
7 { gallery }: Readonly<{ gallery: GalleryView }>,
8) {
9 const description = gallery.description;
10 const facets = gallery.facets;
11 return (
12 <div
13 class="flex flex-col space-y-2 mb-4 max-w-[500px]"
14 id="gallery-info"
15 >
16 <h1 class="font-bold text-2xl">
17 {gallery.title}
18 </h1>
19 <ActorInfo profile={gallery.creator} />
20 {description
21 ? (
22 <p>
23 <RenderFacetedText text={description} facets={facets} />
24 </p>
25 )
26 : null}
27 <CameraBadges class="my-1" cameras={gallery.cameras ?? []} />
28 </div>
29 );
30}