Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
chibat committed Dec 14, 2024
1 parent b98885e commit 5aa090c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
18 changes: 16 additions & 2 deletions islands/PostView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down Expand Up @@ -231,6 +236,15 @@ export default function PostView(
onClick={tweet}
style={{ cursor: "pointer" }}
/>
<img
class="ms-3"
src="/assets/img/bluesky.svg"
title="Bluesky"
alt="Bluesky"
width={20}
onClick={bluesky}
style={{ cursor: "pointer" }}
/>
{requesting &&
(
<div
Expand Down
1 change: 1 addition & 0 deletions static/assets/img/bluesky.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 5aa090c

Please sign in to comment.