[APP-2160] Stabilize avatar style and drop stray Fragments
Hoist the publication avatar style to a module-level const so its identity is stable across renders, and remove two empty Fragment wrappers that served no purpose.
This commit is contained in:
@@ -33,6 +33,10 @@ export type ThemeColors = {
|
||||
accentForeground: string
|
||||
}
|
||||
|
||||
const PUBLICATION_AVATAR_STYLE = {
|
||||
borderRadius: a.rounded_sm.borderRadius,
|
||||
}
|
||||
|
||||
export function useStandardSitePublisherConfig(
|
||||
view: AppBskyEmbedExternal.ViewExternal,
|
||||
) {
|
||||
@@ -365,7 +369,6 @@ export function PublicationCard({
|
||||
a.gap_sm,
|
||||
gtPhone && a.flex_1,
|
||||
]}>
|
||||
<>
|
||||
<PublicationIcon
|
||||
view={view}
|
||||
size={40}
|
||||
@@ -390,7 +393,6 @@ export function PublicationCard({
|
||||
onInteractWithout={onInteractWithout}
|
||||
/>
|
||||
</View>
|
||||
</>
|
||||
</View>
|
||||
|
||||
{!hideSubscribe && (
|
||||
@@ -482,7 +484,7 @@ function PublicationIcon({
|
||||
type="labeler"
|
||||
size={size}
|
||||
avatar={view.source.icon}
|
||||
extraAviStyle={{borderRadius: a.rounded_sm.borderRadius}}
|
||||
extraAviStyle={PUBLICATION_AVATAR_STYLE}
|
||||
/>
|
||||
<MediaInsetBorder
|
||||
style={[
|
||||
@@ -579,7 +581,6 @@ export function PublicationFooter({
|
||||
a.gap_sm,
|
||||
gtPhone && a.flex_1,
|
||||
]}>
|
||||
<>
|
||||
<PublicationIcon
|
||||
view={view}
|
||||
size={32}
|
||||
@@ -604,7 +605,6 @@ export function PublicationFooter({
|
||||
onInteractWithout={onInteractWithout}
|
||||
/>
|
||||
</View>
|
||||
</>
|
||||
</Link>
|
||||
|
||||
{!hideSubscribe && (
|
||||
|
||||
Reference in New Issue
Block a user