tangled
alpha
login
or
join now
leaflet.pub
/
leaflet
a tool for shared writing and social publishing
284
fork
atom
overview
issues
27
pulls
pipelines
add published link for standaloen docs in share menu
awarm.space
2 months ago
4d6fca46
196a576d
+6
-4
1 changed file
expand all
collapse all
unified
split
app
[leaflet_id]
actions
ShareOptions
index.tsx
+6
-4
app/[leaflet_id]/actions/ShareOptions/index.tsx
···
93
93
94
94
let record = pub?.documents?.data as PubLeafletDocument.Record | null;
95
95
96
96
-
let postLink =
97
97
-
pub?.publications && pub.documents
98
98
-
? `${getPublicationURL(pub.publications)}/${new AtUri(pub?.documents.uri).rkey}`
99
99
-
: null;
96
96
+
let docURI = pub?.documents ? new AtUri(pub?.documents.uri) : null;
97
97
+
let postLink = !docURI
98
98
+
? null
99
99
+
: pub?.publications
100
100
+
? `${getPublicationURL(pub.publications)}/${docURI.rkey}`
101
101
+
: `p/${docURI.host}/${docURI.rkey}`;
100
102
let publishLink = useReadOnlyShareLink();
101
103
let [collabLink, setCollabLink] = useState<null | string>(null);
102
104
useEffect(() => {