Fixes youtube embed issues (#50)
* fixes youtube embed * move extractMetaHtml test to its own file * tests cleanup * Add fallback for youtube meta data * lint * Check for youtube in the url domain * use hostname instead of full url to check for link domain * checks only for domain
This commit is contained in:
parent
9230d52ff5
commit
f10a8308d9
12 changed files with 245 additions and 149 deletions
|
@ -39,7 +39,9 @@ export const FeedItem = observer(function ({
|
|||
const itemTitle = `Post by ${item.post.author.handle}`
|
||||
const authorHref = `/profile/${item.post.author.handle}`
|
||||
const replyAuthorDid = useMemo(() => {
|
||||
if (!record?.reply) return ''
|
||||
if (!record?.reply) {
|
||||
return ''
|
||||
}
|
||||
const urip = new AtUri(record.reply.parent?.uri || record.reply.root.uri)
|
||||
return urip.hostname
|
||||
}, [record?.reply])
|
||||
|
@ -196,7 +198,9 @@ export const FeedItem = observer(function ({
|
|||
) : (
|
||||
<View style={{height: 5}} />
|
||||
)}
|
||||
<PostEmbeds embed={item.post.embed} style={styles.embed} />
|
||||
{item.post.embed ? (
|
||||
<PostEmbeds embed={item.post.embed} style={styles.embed} />
|
||||
) : null}
|
||||
<PostCtrls
|
||||
style={styles.ctrls}
|
||||
itemHref={itemHref}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue