mirror of
https://github.com/thelittlerocket/rss-to-email.git
synced 2025-03-01 03:12:56 +08:00
Update screenshot (#45)
* update screenshot * add key to suppress react warning
This commit is contained in:
parent
23b68080e8
commit
3defdc5a37
2 changed files with 8 additions and 3 deletions
BIN
screenshot.png
BIN
screenshot.png
Binary file not shown.
Before Width: | Height: | Size: 238 KiB After Width: | Height: | Size: 240 KiB |
|
@ -1,3 +1,4 @@
|
|||
import { Fragment } from 'react'
|
||||
import { parse } from 'node-html-parser'
|
||||
import { Text } from '@react-email/text'
|
||||
import { Link } from '@react-email/link'
|
||||
|
@ -20,11 +21,15 @@ export default ({ content, href }: Props) => {
|
|||
{elements.map((element) => {
|
||||
switch (element.localName) {
|
||||
case 'p':
|
||||
return <Text style={text}>{element.text}</Text>
|
||||
return (
|
||||
<Text key="p" style={text}>
|
||||
{element.text}
|
||||
</Text>
|
||||
)
|
||||
case 'blockquote':
|
||||
const paragraphs = element.querySelectorAll('> p')
|
||||
return (
|
||||
<>
|
||||
<Fragment key="blockquote">
|
||||
<Text style={blockquote}>{paragraphs[0].text ?? ''}</Text>
|
||||
{blockquoteHasMore && (
|
||||
<Text style={blockquote}>
|
||||
|
@ -33,7 +38,7 @@ export default ({ content, href }: Props) => {
|
|||
</Link>
|
||||
</Text>
|
||||
)}
|
||||
</>
|
||||
</Fragment>
|
||||
)
|
||||
}
|
||||
})}
|
||||
|
|
Loading…
Reference in a new issue