diff options
author | Kuwa Lee <kuwalee1069@gmail.com> | 2024-06-22 11:33:58 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-22 11:33:58 +0800 |
commit | 21a7d47cdc4b431431e211834790561b1163e8d7 (patch) | |
tree | f1d2fc1e5dea330486a3a9fb78907cd314c8c8c3 /bskyogcard/src/components/Img.tsx | |
parent | 39c32b0ab1de312161d4ccedad1f3516451dc315 (diff) | |
parent | 35f64535cb8dfa0fe46e740a6398f3b991ecfbc7 (diff) | |
download | voidsky-21a7d47cdc4b431431e211834790561b1163e8d7.tar.zst |
Merge branch 'bluesky-social:main' into zh
Diffstat (limited to 'bskyogcard/src/components/Img.tsx')
-rw-r--r-- | bskyogcard/src/components/Img.tsx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/bskyogcard/src/components/Img.tsx b/bskyogcard/src/components/Img.tsx new file mode 100644 index 000000000..dac223180 --- /dev/null +++ b/bskyogcard/src/components/Img.tsx @@ -0,0 +1,10 @@ +import React from 'react' + +export function Img( + props: Omit<React.ImgHTMLAttributes<HTMLImageElement>, 'src'> & {src: Buffer}, +) { + const {src, ...others} = props + return ( + <img {...others} src={`data:image/jpeg;base64,${src.toString('base64')}`} /> + ) +} |