From 5aa090cccd84f24b7f24d3053a604b1ed106a010 Mon Sep 17 00:00:00 2001 From: Tomofumi Chiba Date: Sat, 14 Dec 2024 11:07:37 +0900 Subject: [PATCH] fix --- islands/PostView.tsx | 18 ++++++++++++++++-- static/assets/img/bluesky.svg | 1 + 2 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 static/assets/img/bluesky.svg diff --git a/islands/PostView.tsx b/islands/PostView.tsx index 7424a95..8267205 100644 --- a/islands/PostView.tsx +++ b/islands/PostView.tsx @@ -159,8 +159,13 @@ export default function PostView( function tweet() { const url = "https://twitter.com/intent/tweet?text=" + encodeURIComponent(props.postTitle + "\n" + location.href); - window.open(url); - // location.href = url; + globalThis.open(url); + } + + function bluesky() { + const url = "https://bsky.app/intent/compose?text=" + + encodeURIComponent(props.postTitle + "\n" + location.href); + globalThis.open(url); } return ( @@ -231,6 +236,15 @@ export default function PostView( onClick={tweet} style={{ cursor: "pointer" }} /> + Bluesky {requesting && (
\ No newline at end of file