Skip to content

Commit

Permalink
Replace x.com with twitter.com
Browse files Browse the repository at this point in the history
  • Loading branch information
otoyo committed Aug 22, 2023
1 parent 11ef466 commit 9ffc366
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/components/notion-blocks/TweetEmbed.astro
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,16 @@ export interface Props {
}
const { url } = Astro.props
const postURL =
url.hostname === 'x.com' || url.hostname === 'www.x.com'
? new URL(url.pathname, 'https://twitter.com')
: url
---

<div class="tweet-embed">
<blockquote class="twitter-tweet">
<a href={url}></a>
<a href={postURL}></a>
</blockquote>
</div>

Expand Down

0 comments on commit 9ffc366

Please sign in to comment.