a tool for shared writing and social publishing
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix standalone doc themeing on profiles

+9 -8
+9 -8
components/PostListing.tsx
··· 22 22 23 23 let postRecord = props.documents.data as PubLeafletDocument.Record; 24 24 let postUri = new AtUri(props.documents.uri); 25 + let uri = props.publication ? props.publication?.uri : props.documents.uri; 25 26 26 27 let theme = usePubTheme(pubRecord?.theme || postRecord?.theme); 28 + let themeRecord = pubRecord?.theme || postRecord?.theme; 27 29 let backgroundImage = 28 - pubRecord?.theme?.backgroundImage?.image?.ref && props.publication 29 - ? blobRefToSrc( 30 - pubRecord.theme.backgroundImage.image.ref, 31 - new AtUri(props.publication.uri).host, 32 - ) 30 + themeRecord?.backgroundImage?.image?.ref && uri 31 + ? blobRefToSrc(themeRecord.backgroundImage.image.ref, new AtUri(uri).host) 33 32 : null; 34 33 35 - let backgroundImageRepeat = pubRecord?.theme?.backgroundImage?.repeat; 36 - let backgroundImageSize = pubRecord?.theme?.backgroundImage?.width || 500; 34 + let backgroundImageRepeat = themeRecord?.backgroundImage?.repeat; 35 + let backgroundImageSize = themeRecord?.backgroundImage?.width || 500; 37 36 38 - let showPageBackground = pubRecord?.theme?.showPageBackground; 37 + let showPageBackground = pubRecord 38 + ? pubRecord?.theme?.showPageBackground 39 + : postRecord.theme?.showPageBackground ?? true; 39 40 40 41 let quotes = props.documents.document_mentions_in_bsky?.[0]?.count || 0; 41 42 let comments =