File tree Expand file tree Collapse file tree 2 files changed +20
-4
lines changed
features/account/components Expand file tree Collapse file tree 2 files changed +20
-4
lines changed Original file line number Diff line number Diff line change @@ -13,10 +13,13 @@ import { CheckCheck } from '@tamagui/lucide-icons'
13
13
import { useEffect , useState } from 'react'
14
14
import { IconCopy } from './icons'
15
15
import * as Clipboard from 'expo-clipboard'
16
+ import { useConfirmedTags } from 'app/utils/tags'
16
17
17
18
export function ReferralLink ( props : ButtonProps ) {
18
- const { profile, tags } = useUser ( )
19
- const referralCode = tags ?. [ 0 ] ?. name || profile ?. referral_code
19
+ const { profile } = useUser ( )
20
+ const send_id = profile ?. send_id
21
+ const tags = useConfirmedTags ( )
22
+ const referralCode = tags ?. [ 0 ] ?. name
20
23
const referralHref = `https://send.app?referral=${ referralCode } `
21
24
const toast = useToastController ( )
22
25
const [ hasCopied , setHasCopied ] = useState ( false )
@@ -42,7 +45,18 @@ export function ReferralLink(props: ButtonProps) {
42
45
}
43
46
} , [ hasCopied ] )
44
47
45
- if ( ! referralCode ) return null
48
+ if ( ! referralCode ) {
49
+ return (
50
+ < XStack ai = { 'center' } gap = { '$2' } width = { '100%' } >
51
+ < Paragraph size = { '$5' } color = { '$color10' } >
52
+ Send ID:
53
+ </ Paragraph >
54
+ < Paragraph fontSize = { '$5' } fontWeight = { '500' } >
55
+ { send_id }
56
+ </ Paragraph >
57
+ </ XStack >
58
+ )
59
+ }
46
60
47
61
return (
48
62
< XStack ai = { 'center' } gap = { '$2' } width = { '100%' } >
Original file line number Diff line number Diff line change @@ -6,9 +6,11 @@ import { ReferralLink } from 'app/components/ReferralLink'
6
6
import { useEffect , useState } from 'react'
7
7
import * as Sharing from 'expo-sharing'
8
8
import { useHoverStyles } from 'app/utils/useHoverStyles'
9
+ import { useConfirmedTags } from 'app/utils/tags'
9
10
10
11
export const AccountHeader = ( props : YStackProps ) => {
11
- const { profile, tags } = useUser ( )
12
+ const { profile } = useUser ( )
13
+ const tags = useConfirmedTags ( )
12
14
const avatar_url = profile ?. avatar_url
13
15
const name = profile ?. name
14
16
const referralCode = tags ?. [ 0 ] ?. name || profile ?. referral_code
You can’t perform that action at this time.
0 commit comments