Skip to content

Commit 36e64f2

Browse files
Use tag for affiliate referral link
1 parent 7e1b6fb commit 36e64f2

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

packages/app/features/affiliate/screen.tsx

+5-10
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import {
1818
import { useAffiliateReferrals } from './utils/useAffiliateReferrals'
1919
import { Fragment } from 'react'
2020
import { useAffiliateStats } from './utils/useAffiliateStats'
21+
import type { Functions } from '@my/supabase/database.types'
2122

2223
export const AffiliateScreen = () => {
2324
return (
@@ -171,20 +172,14 @@ const ReferralsList = () => {
171172
)
172173
}
173174

174-
const ReferralsListRow = ({ referral }) => {
175+
const ReferralsListRow = ({
176+
referral,
177+
}: { referral: Functions<'get_affiliate_referrals'>[number] }) => {
175178
const date = new Date(referral?.created_at).toLocaleString(undefined, { dateStyle: 'medium' })
176179

177180
return (
178181
<Card bc="$color0" ai="center">
179-
<Link
180-
href={`/profile/${referral.profile?.send_id}`}
181-
f={1}
182-
als="stretch"
183-
px="$5"
184-
py="$3"
185-
w="100%"
186-
h="100%"
187-
>
182+
<Link href={`/${referral.tag}}`} f={1} als="stretch" px="$5" py="$3" w="100%" h="100%">
188183
<XStack gap="$5" f={1} ai="center" jc={'space-between'}>
189184
<XStack gap="$3.5" f={1} ai="center">
190185
<Avatar size="$4.5" br="$4" gap="$2">

0 commit comments

Comments
 (0)