1
- import { useCallback , useEffect , useMemo , useRef , useState } from 'react'
2
- import { useUpdateEffect } from 'react-use'
3
- import { first } from 'lodash-es'
4
- import { TabContext } from '@mui/lab'
5
- import { Button , Stack , Tab , ThemeProvider , Typography } from '@mui/material'
1
+ import Services from '#services'
2
+ import { Trans } from '@lingui/react/macro'
6
3
import { Icons } from '@masknet/icons'
7
- import { useQuery } from '@tanstack/react-query'
8
- import { Telemetry } from '@masknet/web3-telemetry'
9
- import { EventType , EventID } from '@masknet/web3-telemetry/types'
4
+ import { getAvailablePlugins } from '@masknet/plugin-infra'
10
5
import {
6
+ getProfileTabContent ,
11
7
useActivatedPluginsSiteAdaptor ,
12
8
useIsMinimalMode ,
13
9
usePluginTransField ,
14
- getProfileTabContent ,
15
10
} from '@masknet/plugin-infra/content-script'
16
- import { getAvailablePlugins } from '@masknet/plugin-infra'
17
11
import {
18
12
AddressItem ,
13
+ addressSorter ,
19
14
ConnectPersonaBoundary ,
20
15
GrantPermissions ,
16
+ LoadingStatus ,
21
17
PluginCardFrameMini ,
22
- useCurrentPersonaConnectStatus ,
23
- useSocialAccountsBySettings ,
24
- TokenWithSocialGroupMenu ,
25
18
SocialAccountList ,
19
+ TokenWithSocialGroupMenu ,
26
20
useCollectionByTwitterHandle ,
27
- addressSorter ,
21
+ useCurrentPersonaConnectStatus ,
22
+ useSocialAccountsBySettings ,
28
23
WalletSettingsEntry ,
29
- LoadingStatus ,
30
24
} from '@masknet/shared'
31
25
import {
32
26
CrossIsolationMessages ,
27
+ currentPersonaIdentifier ,
33
28
EMPTY_LIST ,
34
29
MaskMessages ,
35
30
NextIDPlatform ,
36
31
PluginID ,
37
32
ProfileTabs ,
38
33
Sniffings ,
39
- currentPersonaIdentifier ,
40
34
} from '@masknet/shared-base'
41
- import { useValueRef , useLocationChange } from '@masknet/shared-base-ui'
35
+ import { useLocationChange , useValueRef } from '@masknet/shared-base-ui'
42
36
import { makeStyles , MaskLightTheme , MaskTabList , useTabs } from '@masknet/theme'
43
- import { NextIDProof } from '@masknet/web3-providers'
44
- import { isSameAddress } from '@masknet/web3-shared-base'
45
37
import { ScopedDomainsContainer , useSnapshotSpacesByTwitterHandle } from '@masknet/web3-hooks-base'
38
+ import { Web3Bio } from '@masknet/web3-providers'
39
+ import { isSameAddress } from '@masknet/web3-shared-base'
40
+ import { Telemetry } from '@masknet/web3-telemetry'
41
+ import { EventID , EventType } from '@masknet/web3-telemetry/types'
42
+ import { TabContext } from '@mui/lab'
43
+ import { Button , Stack , Tab , ThemeProvider , Typography } from '@mui/material'
44
+ import { useQuery } from '@tanstack/react-query'
45
+ import { first } from 'lodash-es'
46
+ import { useCallback , useEffect , useMemo , useRef , useState } from 'react'
47
+ import { useUpdateEffect } from 'react-use'
48
+ import { usePersonasFromDB } from '../../../shared-ui/hooks/usePersonasFromDB.js'
46
49
import {
47
50
useCurrentVisitingIdentity ,
48
51
useLastRecognizedIdentity ,
@@ -51,9 +54,6 @@ import {
51
54
} from '../DataSource/useActivatedUI.js'
52
55
import { useGrantPermissions , usePluginHostPermissionCheck } from '../DataSource/usePluginHostPermission.js'
53
56
import { SearchResultInspector } from './SearchResultInspector.js'
54
- import { usePersonasFromDB } from '../../../shared-ui/hooks/usePersonasFromDB.js'
55
- import Services from '#services'
56
- import { Trans } from '@lingui/react/macro'
57
57
58
58
const useStyles = makeStyles ( ) ( ( theme ) => ( {
59
59
root : {
@@ -306,11 +306,11 @@ function Content(props: ProfileTabContentProps) {
306
306
307
307
const { data : identity } = useSocialIdentityByUserId ( currentVisitingUserId )
308
308
309
- const { data : nextIdBindings = EMPTY_LIST } = useQuery ( {
310
- queryKey : [ 'profiles ' , 'by-twitter-id' , currentVisitingUserId ] ,
309
+ const { data : web3bioProfiles = EMPTY_LIST } = useQuery ( {
310
+ queryKey : [ 'web3bio ' , 'by-twitter-id' , currentVisitingUserId ] ,
311
311
queryFn : ( ) => {
312
312
if ( ! currentVisitingUserId ) return EMPTY_LIST
313
- return NextIDProof . queryProfilesByTwitterId ( currentVisitingUserId )
313
+ return Web3Bio . getProfilesByTwitterId ( currentVisitingUserId )
314
314
} ,
315
315
} )
316
316
@@ -465,7 +465,7 @@ function Content(props: ProfileTabContentProps) {
465
465
fromSocialCard
466
466
/>
467
467
468
- < SocialAccountList nextIdBindings = { nextIdBindings } userId = { currentVisitingUserId } />
468
+ < SocialAccountList web3bioProfiles = { web3bioProfiles } userId = { currentVisitingUserId } />
469
469
</ div >
470
470
< div className = { classes . settingItem } >
471
471
< Trans >
0 commit comments