forked from onnimonni/nextjs-notion-starter-kit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPageActions.tsx
33 lines (30 loc) · 892 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
import { AiOutlineRetweet } from 'react-icons/ai'
import { IoHeartOutline } from 'react-icons/io5'
import styles from './styles.module.css'
/**
* @see https://developer.twitter.com/en/docs/twitter-for-websites/web-intents/overview
*/
export function PageActions({ tweet }: { tweet: string }) {
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>
)
}