[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
|
accentForeground: string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const PUBLICATION_AVATAR_STYLE = {
|
||||||
|
borderRadius: a.rounded_sm.borderRadius,
|
||||||
|
}
|
||||||
|
|
||||||
export function useStandardSitePublisherConfig(
|
export function useStandardSitePublisherConfig(
|
||||||
view: AppBskyEmbedExternal.ViewExternal,
|
view: AppBskyEmbedExternal.ViewExternal,
|
||||||
) {
|
) {
|
||||||
@@ -365,7 +369,6 @@ export function PublicationCard({
|
|||||||
a.gap_sm,
|
a.gap_sm,
|
||||||
gtPhone && a.flex_1,
|
gtPhone && a.flex_1,
|
||||||
]}>
|
]}>
|
||||||
<>
|
|
||||||
<PublicationIcon
|
<PublicationIcon
|
||||||
view={view}
|
view={view}
|
||||||
size={40}
|
size={40}
|
||||||
@@ -390,7 +393,6 @@ export function PublicationCard({
|
|||||||
onInteractWithout={onInteractWithout}
|
onInteractWithout={onInteractWithout}
|
||||||
/>
|
/>
|
||||||
</View>
|
</View>
|
||||||
</>
|
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
{!hideSubscribe && (
|
{!hideSubscribe && (
|
||||||
@@ -482,7 +484,7 @@ function PublicationIcon({
|
|||||||
type="labeler"
|
type="labeler"
|
||||||
size={size}
|
size={size}
|
||||||
avatar={view.source.icon}
|
avatar={view.source.icon}
|
||||||
extraAviStyle={{borderRadius: a.rounded_sm.borderRadius}}
|
extraAviStyle={PUBLICATION_AVATAR_STYLE}
|
||||||
/>
|
/>
|
||||||
<MediaInsetBorder
|
<MediaInsetBorder
|
||||||
style={[
|
style={[
|
||||||
@@ -579,7 +581,6 @@ export function PublicationFooter({
|
|||||||
a.gap_sm,
|
a.gap_sm,
|
||||||
gtPhone && a.flex_1,
|
gtPhone && a.flex_1,
|
||||||
]}>
|
]}>
|
||||||
<>
|
|
||||||
<PublicationIcon
|
<PublicationIcon
|
||||||
view={view}
|
view={view}
|
||||||
size={32}
|
size={32}
|
||||||
@@ -604,7 +605,6 @@ export function PublicationFooter({
|
|||||||
onInteractWithout={onInteractWithout}
|
onInteractWithout={onInteractWithout}
|
||||||
/>
|
/>
|
||||||
</View>
|
</View>
|
||||||
</>
|
|
||||||
</Link>
|
</Link>
|
||||||
|
|
||||||
{!hideSubscribe && (
|
{!hideSubscribe && (
|
||||||
|
|||||||
Reference in New Issue
Block a user