fix social-app web support link
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
--- a/src/screens/Profile/Header/ProfileHeaderStandard.tsx 2026-02-16 03:00:07
|
||||
+++ b/src/screens/Profile/Header/ProfileHeaderStandard.tsx 2026-02-16 03:02:25
|
||||
--- a/src/screens/Profile/Header/ProfileHeaderStandard.tsx
|
||||
+++ b/src/screens/Profile/Header/ProfileHeaderStandard.tsx
|
||||
@@ -1,5 +1,5 @@
|
||||
import {memo, useMemo, useState} from 'react'
|
||||
-import {View} from 'react-native'
|
||||
@@ -7,28 +7,20 @@
|
||||
import {
|
||||
type AppBskyActorDefs,
|
||||
moderateProfile,
|
||||
@@ -9,9 +9,11 @@
|
||||
@@ -9,9 +9,12 @@
|
||||
} from '@atproto/api'
|
||||
import {msg, Trans} from '@lingui/macro'
|
||||
import {useLingui} from '@lingui/react'
|
||||
+import {useQuery} from '@tanstack/react-query'
|
||||
|
||||
import {useActorStatus} from '#/lib/actor-status'
|
||||
+import {BSKY_SERVICE} from '#/lib/constants'
|
||||
import {useHaptics} from '#/lib/haptics'
|
||||
+import {useOpenLink} from '#/lib/hooks/useOpenLink'
|
||||
import {sanitizeDisplayName} from '#/lib/strings/display-names'
|
||||
import {sanitizeHandle} from '#/lib/strings/handles'
|
||||
import {logger} from '#/logger'
|
||||
@@ -20,7 +22,7 @@
|
||||
useProfileBlockMutationQueue,
|
||||
useProfileFollowMutationQueue,
|
||||
} from '#/state/queries/profile'
|
||||
-import {useRequireAuth, useSession} from '#/state/session'
|
||||
+import {useAgent, useRequireAuth, useSession} from '#/state/session'
|
||||
import {ProfileMenu} from '#/view/com/profile/ProfileMenu'
|
||||
import {atoms as a, platform, useBreakpoints, useTheme} from '#/alf'
|
||||
import {SubscribeProfileButton} from '#/components/activity-notifications/SubscribeProfileButton'
|
||||
@@ -45,6 +47,83 @@
|
||||
@@ -45,6 +48,84 @@
|
||||
import {ProfileHeaderMetrics} from './Metrics'
|
||||
import {ProfileHeaderShell} from './Shell'
|
||||
import {ProfileHeaderSuggestedFollows} from './SuggestedFollows'
|
||||
@@ -45,16 +37,17 @@
|
||||
+ profile: AppBskyActorDefs.ProfileViewDetailed
|
||||
+}) {
|
||||
+ const t = useTheme()
|
||||
+ const agent = useAgent()
|
||||
+ const openLink = useOpenLink()
|
||||
+
|
||||
+ const {data: services} = useQuery({
|
||||
+ queryKey: ['profile-services', profile.did],
|
||||
+ queryFn: async () => {
|
||||
+ const res = await agent.com.atproto.repo.describeRepo({
|
||||
+ repo: profile.did,
|
||||
+ })
|
||||
+ const collections: string[] = res.data.collections || []
|
||||
+ const res = await fetch(
|
||||
+ `${BSKY_SERVICE}/xrpc/com.atproto.repo.describeRepo?repo=${encodeURIComponent(profile.did)}`,
|
||||
+ )
|
||||
+ if (!res.ok) throw new Error('failed')
|
||||
+ const data = await res.json()
|
||||
+ const collections: string[] = data.collections || []
|
||||
+ const serviceSet = new Set<string>()
|
||||
+ for (const nsid of collections) {
|
||||
+ const parts = nsid.split('.')
|
||||
@@ -112,7 +105,7 @@
|
||||
|
||||
interface Props {
|
||||
profile: AppBskyActorDefs.ProfileViewDetailed
|
||||
@@ -151,6 +230,7 @@
|
||||
@@ -151,6 +232,7 @@
|
||||
{!isPlaceholderProfile && !isBlockedUser && (
|
||||
<View style={a.gap_md}>
|
||||
<ProfileHeaderMetrics profile={profile} />
|
||||
|
||||
Reference in New Issue
Block a user