Add back list purpose logic
This commit is contained in:
@@ -39,7 +39,11 @@ export function Default(props: Props) {
|
|||||||
<Outer>
|
<Outer>
|
||||||
<Header>
|
<Header>
|
||||||
<Avatar src={view.avatar} />
|
<Avatar src={view.avatar} />
|
||||||
<TitleAndByline title={view.name} creator={view.creator} />
|
<TitleAndByline
|
||||||
|
title={view.name}
|
||||||
|
creator={view.creator}
|
||||||
|
purpose={view.purpose}
|
||||||
|
/>
|
||||||
{showPinButton && <Action uri={view.uri} pin type="list" />}
|
{showPinButton && <Action uri={view.uri} pin type="list" />}
|
||||||
</Header>
|
</Header>
|
||||||
<Description description={view.description} />
|
<Description description={view.description} />
|
||||||
@@ -73,9 +77,11 @@ export function Link({
|
|||||||
export function TitleAndByline({
|
export function TitleAndByline({
|
||||||
title,
|
title,
|
||||||
creator,
|
creator,
|
||||||
|
purpose,
|
||||||
}: {
|
}: {
|
||||||
title: string
|
title: string
|
||||||
creator?: AppBskyActorDefs.ProfileViewBasic
|
creator?: AppBskyActorDefs.ProfileViewBasic
|
||||||
|
purpose: AppBskyGraphDefs.ListView['purpose']
|
||||||
}) {
|
}) {
|
||||||
const t = useTheme()
|
const t = useTheme()
|
||||||
|
|
||||||
@@ -88,7 +94,13 @@ export function TitleAndByline({
|
|||||||
<Text
|
<Text
|
||||||
style={[a.leading_snug, t.atoms.text_contrast_medium]}
|
style={[a.leading_snug, t.atoms.text_contrast_medium]}
|
||||||
numberOfLines={1}>
|
numberOfLines={1}>
|
||||||
|
{purpose === 'app.bsky.graph.defs#curatelist' ? (
|
||||||
<Trans>List by {sanitizeHandle(creator.handle, '@')}</Trans>
|
<Trans>List by {sanitizeHandle(creator.handle, '@')}</Trans>
|
||||||
|
) : (
|
||||||
|
<Trans>
|
||||||
|
Moderation list by {sanitizeHandle(creator.handle, '@')}
|
||||||
|
</Trans>
|
||||||
|
)}
|
||||||
</Text>
|
</Text>
|
||||||
)}
|
)}
|
||||||
</View>
|
</View>
|
||||||
|
|||||||
Reference in New Issue
Block a user