"use client"; import { AtUri } from "@atproto/syntax"; import { PublicationSubscription } from "app/reader/getSubscriptions"; import { PubIcon } from "components/ActionBar/Publications"; import { Separator } from "components/Layout"; import { usePubTheme } from "components/ThemeManager/PublicationThemeProvider"; import { BaseThemeProvider } from "components/ThemeManager/ThemeProvider"; import { PubLeafletPublication, PubLeafletThemeColor } from "lexicons/api"; import { blobRefToSrc } from "src/utils/blobRefToSrc"; import { timeAgo } from "src/utils/timeAgo"; import { Json } from "supabase/database.types"; export const PubListing = ( props: PublicationSubscription & { resizeHeight?: boolean; }, ) => { let record = props.record as PubLeafletPublication.Record; let theme = usePubTheme(record); let backgroundImage = record?.theme?.backgroundImage?.image?.ref ? blobRefToSrc( record?.theme?.backgroundImage?.image?.ref, new AtUri(props.uri).host, ) : null; let backgroundImageRepeat = record?.theme?.backgroundImage?.repeat; let backgroundImageSize = record?.theme?.backgroundImage?.width || 500; if (!record) return null; return (

{record.name}

{record.description && (

{record.description}

)}
{props.authorProfile?.handle}

Updated{" "} {timeAgo( props.documents_in_publications?.[0]?.documents?.indexed_at || "", )}

); };