Add group chat join links to supported embed types (#10454)
This commit is contained in:
@@ -11,6 +11,7 @@ import {atoms as a, useTheme} from '#/alf'
|
||||
import {Loader} from '#/components/Loader'
|
||||
import {ExternalEmbed} from '#/components/Post/Embed/ExternalEmbed'
|
||||
import {ModeratedFeedEmbed} from '#/components/Post/Embed/FeedEmbed'
|
||||
import {JoinRequestEmbed} from '#/components/Post/Embed/JoinRequestEmbed'
|
||||
import {ModeratedListEmbed} from '#/components/Post/Embed/ListEmbed'
|
||||
import {StandardSiteEmbed} from '#/components/Post/Embed/StandardSiteEmbed'
|
||||
import {isStandardSiteEmbed} from '#/components/Post/Embed/StandardSiteEmbed/utils'
|
||||
@@ -115,6 +116,8 @@ export const ExternalEmbedLink = ({
|
||||
hideAlt
|
||||
/>
|
||||
)
|
||||
} else if (data.type === 'chat-invite') {
|
||||
return <JoinRequestEmbed preview={data.view} />
|
||||
} else if (data.kind === 'feed') {
|
||||
return (
|
||||
<ModeratedFeedEmbed
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import {View} from 'react-native'
|
||||
import {msg} from '@lingui/core/macro'
|
||||
import {useLingui} from '@lingui/react'
|
||||
import {useLingui} from '@lingui/react/macro'
|
||||
|
||||
import {atoms as a, useTheme, type ViewStyleProp} from '#/alf'
|
||||
import {Button, ButtonIcon} from '#/components/Button'
|
||||
@@ -11,12 +10,12 @@ export function ExternalEmbedRemoveBtn({
|
||||
style,
|
||||
}: {onRemove: () => void} & ViewStyleProp) {
|
||||
const t = useTheme()
|
||||
const {_} = useLingui()
|
||||
const {t: l} = useLingui()
|
||||
|
||||
return (
|
||||
<View style={[a.absolute, {top: 8, right: 8}, a.z_50, style]}>
|
||||
<Button
|
||||
label={_(msg`Remove attachment`)}
|
||||
label={l`Remove attachment`}
|
||||
onPress={onRemove}
|
||||
size="small"
|
||||
variant="solid"
|
||||
|
||||
Reference in New Issue
Block a user