Skip to content

Commit 5892a7a

Browse files
authored
Fixed no friends message (#1474)
1 parent 78a59dc commit 5892a7a

File tree

2 files changed

+10
-19
lines changed

2 files changed

+10
-19
lines changed

packages/app/components/ReferralLink.tsx

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,12 @@ import {
1010
} from '@my/ui'
1111
import { useUser } from 'app/utils/useUser'
1212
import { CheckCheck } from '@tamagui/lucide-icons'
13-
import { type ReactNode, useEffect, useState } from 'react'
13+
import { useEffect, useState } from 'react'
1414
import { IconCopy } from './icons'
1515
import * as Clipboard from 'expo-clipboard'
1616
import { useConfirmedTags } from 'app/utils/tags'
1717

18-
type ReferralLink = { label?: ReactNode } & ButtonProps
19-
20-
export function ReferralLink({ label, ...props }: ReferralLink) {
18+
export function ReferralLink(props: ButtonProps) {
2119
const { profile } = useUser()
2220
const send_id = profile?.send_id
2321
const tags = useConfirmedTags()
@@ -62,11 +60,9 @@ export function ReferralLink({ label, ...props }: ReferralLink) {
6260

6361
return (
6462
<XStack ai={'center'} gap={'$2'} width={'100%'}>
65-
{label || (
66-
<Paragraph size={'$5'} color={'$color10'} flexShrink={0}>
67-
Referral Code:
68-
</Paragraph>
69-
)}
63+
<Paragraph size={'$5'} color={'$color10'} flexShrink={0}>
64+
Referral Code:
65+
</Paragraph>
7066
<Button
7167
chromeless
7268
flex={1}
@@ -91,7 +87,7 @@ export function ReferralLink({ label, ...props }: ReferralLink) {
9187
<ButtonText
9288
fontSize={'$5'}
9389
fontWeight={'500'}
94-
bc="$background"
90+
bc="transparent"
9591
maxWidth={'85%'}
9692
hoverStyle={{
9793
color: '$primary',

packages/app/features/affiliate/screen.tsx

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -120,15 +120,10 @@ export const FriendsScreen = () => {
120120

121121
if (referrals.length === 0) {
122122
return (
123-
<XStack ai={'flex-start'} pt={'$5'}>
124-
<ReferralLink
125-
f={0}
126-
p={0}
127-
label={
128-
<Paragraph size={'$5'}>Invite friends to Send using your referral code:</Paragraph>
129-
}
130-
/>
131-
</XStack>
123+
<YStack w={'100%'} ai={'flex-start'} pt={'$5'} gap={'$5'}>
124+
<Paragraph size={'$5'}>Invite friends to Send using your referral code.</Paragraph>
125+
<ReferralLink f={0} p={0} />
126+
</YStack>
132127
)
133128
}
134129

0 commit comments

Comments
 (0)