Skip to content

Commit 5aa090c

Browse files
committed
fix
1 parent b98885e commit 5aa090c

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

islands/PostView.tsx

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,13 @@ export default function PostView(
159159
function tweet() {
160160
const url = "https://twitter.com/intent/tweet?text=" +
161161
encodeURIComponent(props.postTitle + "\n" + location.href);
162-
window.open(url);
163-
// location.href = url;
162+
globalThis.open(url);
163+
}
164+
165+
function bluesky() {
166+
const url = "https://bsky.app/intent/compose?text=" +
167+
encodeURIComponent(props.postTitle + "\n" + location.href);
168+
globalThis.open(url);
164169
}
165170

166171
return (
@@ -231,6 +236,15 @@ export default function PostView(
231236
onClick={tweet}
232237
style={{ cursor: "pointer" }}
233238
/>
239+
<img
240+
class="ms-3"
241+
src="/assets/img/bluesky.svg"
242+
title="Bluesky"
243+
alt="Bluesky"
244+
width={20}
245+
onClick={bluesky}
246+
style={{ cursor: "pointer" }}
247+
/>
234248
{requesting &&
235249
(
236250
<div

static/assets/img/bluesky.svg

Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)