forked from transitive-bullshit/nextjs-notion-starter-kit
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathPageActions.tsx
35 lines (31 loc) · 991 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
35
import * as React from 'react'
import { AiOutlineRetweet } from '@react-icons/all-files/ai/AiOutlineRetweet'
import { IoHeartOutline } from '@react-icons/all-files/io5/IoHeartOutline'
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>
)
}