-
Notifications
You must be signed in to change notification settings - Fork 111
/
Copy pathPageActions.tsx
executable file
·34 lines (31 loc) · 931 Bytes
/
PageActions.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import React from 'react'
import { IoHeartOutline } from 'react-icons/io5'
import { AiOutlineRetweet } from 'react-icons/ai'
import styles from './styles.module.css'
/**
* @see https://developer.twitter.com/en/docs/twitter-for-websites/web-intents/overview
*/
export const PageActions: React.FC<{ tweet: string }> = ({ tweet }) => {
return (
<div className={styles.pageActions}>
<a
className={styles.likeTweet}
href={`https://twitter.com/intent/like?tweet_id=${tweet}`}
target='_blank'
rel='noopener noreferrer'
title='Like this post on Twitter'
>
<IoHeartOutline />
</a>
<a
className={styles.retweet}
href={`https://twitter.com/intent/retweet?tweet_id=${tweet}`}
target='_blank'
rel='noopener noreferrer'
title='Retweet this post on Twitter'
>
<AiOutlineRetweet />
</a>
</div>
)
}