feat: tweet embed (#488)

Co-authored-by: DIYgod <i@diygod.me>
This commit is contained in:
birdgg
2023-05-09 16:28:20 +01:00
committed by GitHub
co-authored by DIYgod
parent 32e82e69ba
commit 21cbd12e00
6 changed files with 92 additions and 1 deletions
+12
View File
@@ -0,0 +1,12 @@
import Image from "next/image"
import { Tweet as ReactTweet } from "react-tweet"
import type { TweetComponents } from "react-tweet"
const components: TweetComponents = {
AvatarImg: (props) => <Image {...props} />,
MediaImg: (props) => <Image {...props} fill unoptimized />,
}
export function Tweet({ id }: { id: string }) {
return <ReactTweet id={id} components={components} />
}