From d47528cde54218f2f51c39e87f36caaf1a06adac Mon Sep 17 00:00:00 2001 From: Jared Pereira Date: Sat, 14 Feb 2026 00:25:44 +0400 Subject: [PATCH] fix share links in postlisting --- components/PostListing.tsx | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/components/PostListing.tsx b/components/PostListing.tsx index 089ba130..a98cb407 100644 --- a/components/PostListing.tsx +++ b/components/PostListing.tsx @@ -53,7 +53,9 @@ export const PostListing = (props: Post) => { return; } let alpha = Number( - window.getComputedStyle(elRef.current).getPropertyValue("--bg-page-alpha"), + window + .getComputedStyle(elRef.current) + .getPropertyValue("--bg-page-alpha"), ); setHasBackgroundImage(alpha < 0.7); }, [themeRecord?.backgroundImage?.image]); @@ -75,7 +77,10 @@ export const PostListing = (props: Post) => { pubRecord?.preferences, ); - let quotes = props.documents.mentionsCount ?? props.documents.document_mentions_in_bsky?.[0]?.count ?? 0; + let quotes = + props.documents.mentionsCount ?? + props.documents.document_mentions_in_bsky?.[0]?.count ?? + 0; let comments = mergedPrefs.showComments === false ? 0 @@ -281,7 +286,11 @@ const Share = (props: { postUrl: string }) => { let mouseY = e.clientY; if (!props.postUrl) return; - navigator.clipboard.writeText(`leaflet.pub${props.postUrl}`); + navigator.clipboard.writeText( + props.postUrl.includes("http") + ? props.postUrl + : `leaflet.pub/${props.postUrl}`, + ); smoker({ text: Copied Link!, -- 2.51.2