tweaks
This commit is contained in:
@@ -21,11 +21,12 @@ export function NewskieDialog({
|
|||||||
profile: AppBskyActorDefs.ProfileViewDetailed
|
profile: AppBskyActorDefs.ProfileViewDetailed
|
||||||
}) {
|
}) {
|
||||||
const {_} = useLingui()
|
const {_} = useLingui()
|
||||||
const control = useDialogControl()
|
|
||||||
|
|
||||||
const profileName = profile.displayName || `@${profile.handle}`
|
|
||||||
const joinedVia = profile.joinedViaStarterPack
|
|
||||||
const {currentAccount} = useSession()
|
const {currentAccount} = useSession()
|
||||||
|
const control = useDialogControl()
|
||||||
|
const {joinedViaStarterPack} = profile
|
||||||
|
const profileName = profile.displayName || `@${profile.handle}`
|
||||||
|
|
||||||
|
if (!profile.createdAt) return null
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
@@ -48,22 +49,31 @@ export function NewskieDialog({
|
|||||||
<Trans>Say hello!</Trans>
|
<Trans>Say hello!</Trans>
|
||||||
</Text>
|
</Text>
|
||||||
<Text style={[a.text_md]}>
|
<Text style={[a.text_md]}>
|
||||||
{AppBskyGraphStarterpack.isRecord(joinedVia?.record) &&
|
{AppBskyGraphStarterpack.isRecord(
|
||||||
profile.createdAt ? (
|
joinedViaStarterPack?.record,
|
||||||
|
) ? (
|
||||||
<Trans>
|
<Trans>
|
||||||
{profileName} joined Bluesky {ago(profile.createdAt, true)}{' '}
|
{profileName} joined Bluesky {ago(profile.createdAt, true)}{' '}
|
||||||
ago with{' '}
|
ago with{' '}
|
||||||
{joinedVia?.creator.did === currentAccount?.did
|
{joinedViaStarterPack?.creator.did === currentAccount?.did
|
||||||
? 'your'
|
? 'your'
|
||||||
: `${joinedVia?.creator.displayName}'s` ||
|
: `${joinedViaStarterPack?.creator.displayName}'s` ||
|
||||||
`@${joinedVia?.creator.handle}'s`}{' '}
|
`@${joinedViaStarterPack?.creator.handle}'s`}{' '}
|
||||||
starter pack.
|
starter pack.
|
||||||
</Trans>
|
</Trans>
|
||||||
) : (
|
) : (
|
||||||
<Trans>{profileName} recently joined Bluesky 3 days ago</Trans>
|
<Trans>
|
||||||
|
{profileName} recently joined Bluesky {ago(profile.createdAt)}{' '}
|
||||||
|
ago
|
||||||
|
</Trans>
|
||||||
)}
|
)}
|
||||||
</Text>
|
</Text>
|
||||||
<StarterPackCard starterPack={joinedVia} type="dialog" />
|
{joinedViaStarterPack && (
|
||||||
|
<StarterPackCard
|
||||||
|
starterPack={joinedViaStarterPack}
|
||||||
|
type="dialog"
|
||||||
|
/>
|
||||||
|
)}
|
||||||
</View>
|
</View>
|
||||||
</Dialog.ScrollableInner>
|
</Dialog.ScrollableInner>
|
||||||
</Dialog.Outer>
|
</Dialog.Outer>
|
||||||
|
|||||||
Reference in New Issue
Block a user