Show CTAs in previews
This commit is contained in:
@@ -38,12 +38,10 @@ export const StandardSiteEmbed = ({
|
|||||||
view,
|
view,
|
||||||
onOpen,
|
onOpen,
|
||||||
style,
|
style,
|
||||||
hideSubscribe,
|
|
||||||
}: {
|
}: {
|
||||||
view: AppBskyEmbedExternal.ViewExternal
|
view: AppBskyEmbedExternal.ViewExternal
|
||||||
onOpen?: () => void
|
onOpen?: () => void
|
||||||
style?: StyleProp<ViewStyle>
|
style?: StyleProp<ViewStyle>
|
||||||
hideSubscribe?: boolean
|
|
||||||
}) => {
|
}) => {
|
||||||
const {t: l, i18n} = useLingui()
|
const {t: l, i18n} = useLingui()
|
||||||
const t = useTheme()
|
const t = useTheme()
|
||||||
@@ -94,7 +92,6 @@ export const StandardSiteEmbed = ({
|
|||||||
if (isStandardPublication) {
|
if (isStandardPublication) {
|
||||||
return (
|
return (
|
||||||
<PublicationCard
|
<PublicationCard
|
||||||
hideSubscribe={hideSubscribe}
|
|
||||||
view={view}
|
view={view}
|
||||||
onPress={onPress}
|
onPress={onPress}
|
||||||
onLongPress={onLongPress}
|
onLongPress={onLongPress}
|
||||||
@@ -241,7 +238,6 @@ export const StandardSiteEmbed = ({
|
|||||||
onPress={onPress}
|
onPress={onPress}
|
||||||
onLongPress={onLongPress}
|
onLongPress={onLongPress}
|
||||||
themeColors={themeColors}
|
themeColors={themeColors}
|
||||||
hideSubscribe={hideSubscribe}
|
|
||||||
interactedOuter={interacted}
|
interactedOuter={interacted}
|
||||||
/>
|
/>
|
||||||
</View>
|
</View>
|
||||||
@@ -252,14 +248,12 @@ export const StandardSiteEmbed = ({
|
|||||||
|
|
||||||
export function PublicationCard({
|
export function PublicationCard({
|
||||||
view,
|
view,
|
||||||
hideSubscribe,
|
|
||||||
onPress,
|
onPress,
|
||||||
onLongPress,
|
onLongPress,
|
||||||
themeColors,
|
themeColors,
|
||||||
style,
|
style,
|
||||||
}: {
|
}: {
|
||||||
view: AppBskyEmbedExternal.ViewExternal
|
view: AppBskyEmbedExternal.ViewExternal
|
||||||
hideSubscribe?: boolean
|
|
||||||
onPress?: () => void
|
onPress?: () => void
|
||||||
onLongPress?: () => void
|
onLongPress?: () => void
|
||||||
themeColors: ThemeColors
|
themeColors: ThemeColors
|
||||||
@@ -340,7 +334,7 @@ export function PublicationCard({
|
|||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
{!hideSubscribe && gtPhone && (
|
{gtPhone && (
|
||||||
<SubscribeButton
|
<SubscribeButton
|
||||||
view={view}
|
view={view}
|
||||||
style={[!gtPhone && [a.w_full, a.justify_center]]}
|
style={[!gtPhone && [a.w_full, a.justify_center]]}
|
||||||
@@ -359,7 +353,7 @@ export function PublicationCard({
|
|||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{!hideSubscribe && !gtPhone && (
|
{!gtPhone && (
|
||||||
<View style={[view.description && a.pt_sm]}>
|
<View style={[view.description && a.pt_sm]}>
|
||||||
<SubscribeButton
|
<SubscribeButton
|
||||||
view={view}
|
view={view}
|
||||||
@@ -477,14 +471,12 @@ function PublicationIcon({
|
|||||||
|
|
||||||
export function PublicationFooter({
|
export function PublicationFooter({
|
||||||
view,
|
view,
|
||||||
hideSubscribe,
|
|
||||||
themeColors,
|
themeColors,
|
||||||
onPress,
|
onPress,
|
||||||
onLongPress,
|
onLongPress,
|
||||||
interactedOuter,
|
interactedOuter,
|
||||||
}: {
|
}: {
|
||||||
view: AppBskyEmbedExternal.ViewExternal
|
view: AppBskyEmbedExternal.ViewExternal
|
||||||
hideSubscribe?: boolean
|
|
||||||
themeColors: ThemeColors
|
themeColors: ThemeColors
|
||||||
onPress?: () => void
|
onPress?: () => void
|
||||||
onLongPress?: () => void
|
onLongPress?: () => void
|
||||||
@@ -561,14 +553,12 @@ export function PublicationFooter({
|
|||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
{!hideSubscribe && (
|
|
||||||
<SubscribeButton
|
<SubscribeButton
|
||||||
view={view}
|
view={view}
|
||||||
style={[a.z_10, !gtPhone && [a.w_full, a.justify_center]]}
|
style={[a.z_10, !gtPhone && [a.w_full, a.justify_center]]}
|
||||||
onPress={onPress}
|
onPress={onPress}
|
||||||
onLongPress={onLongPress}
|
onLongPress={onLongPress}
|
||||||
/>
|
/>
|
||||||
)}
|
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -91,7 +91,6 @@ export const ExternalEmbedLink = ({
|
|||||||
if (data.view && isStandardSiteEmbed(data.view.external)) {
|
if (data.view && isStandardSiteEmbed(data.view.external)) {
|
||||||
return (
|
return (
|
||||||
<StandardSiteEmbed
|
<StandardSiteEmbed
|
||||||
hideSubscribe
|
|
||||||
view={{
|
view={{
|
||||||
...data.view?.external,
|
...data.view?.external,
|
||||||
title: data.view?.external?.title || data.title || uri,
|
title: data.view?.external?.title || data.title || uri,
|
||||||
|
|||||||
Reference in New Issue
Block a user