Skip to content

Commit 7f8a4cb

Browse files
Change Referral to Affiliate page
1 parent 3484e52 commit 7f8a4cb

File tree

9 files changed

+282
-525
lines changed

9 files changed

+282
-525
lines changed

apps/next/pages/account/affiliate.tsx

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import Head from 'next/head'
2+
import { userProtectedGetSSP } from 'utils/userProtected'
3+
import type { NextPageWithLayout } from '../_app'
4+
import { AffiliateScreen } from 'app/features/affiliate/screen'
5+
import { HomeLayout } from 'app/features/home/layout.web'
6+
import { TopNav } from 'app/components/TopNav'
7+
8+
export const Page: NextPageWithLayout = () => {
9+
return (
10+
<>
11+
<Head>
12+
<title>Send | Affiliates</title>
13+
<meta
14+
name="description"
15+
content="View your network, track your score, and see your referrals activity."
16+
key="desc"
17+
/>
18+
</Head>
19+
<AffiliateScreen />
20+
</>
21+
)
22+
}
23+
24+
const subheader = 'View your network, track your score, and see your referrals activity.'
25+
26+
export const getServerSideProps = userProtectedGetSSP()
27+
28+
Page.getLayout = (children) => (
29+
<HomeLayout TopNav={<TopNav header="Affiliate" subheader={subheader} />}>{children}</HomeLayout>
30+
)
31+
32+
export default Page

apps/next/pages/referrals.tsx

-26
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import type { ColorTokens } from '@my/ui/types'
2+
import { type IconProps, themed } from '@tamagui/helpers-icon'
3+
import { memo } from 'react'
4+
import { Mask, Path, Svg, Rect, G } from 'react-native-svg'
5+
6+
const Rocket = (props) => {
7+
const { size, color, ...rest } = props
8+
return (
9+
<Svg
10+
width={size ?? 48}
11+
height={size ?? 48}
12+
color={color as ColorTokens | undefined}
13+
viewBox="0 0 48 48"
14+
fill="none"
15+
{...rest}
16+
>
17+
<Mask id="mask0_1_1346" maskUnits="userSpaceOnUse" x="0" y="0" width="48" height="48">
18+
<Rect width="48" height="48" fill="#D9D9D9" />
19+
</Mask>
20+
<G mask="url(#mask0_1_1346)">
21+
<Path
22+
d="M9.35 20.4499L14.65 22.6999C15.25 21.4999 15.8917 20.3166 16.575 19.1499C17.2583 17.9832 17.9833 16.8666 18.75 15.7999L14.8 14.9999L9.35 20.4499ZM17.05 24.4999L23.7 31.1499C25.6 30.2832 27.3833 29.2999 29.05 28.1999C30.7167 27.0999 32.0667 26.0332 33.1 24.9999C35.8 22.2999 37.7833 19.5332 39.05 16.6999C40.3167 13.8666 41 10.6666 41.1 7.0999C37.5333 7.1999 34.3333 7.88323 31.5 9.1499C28.6667 10.4166 25.9 12.3999 23.2 15.0999C22.1667 16.1332 21.1 17.4832 20 19.1499C18.9 20.8166 17.9167 22.5999 17.05 24.4999ZM28.5 19.6999C27.8333 19.0332 27.5 18.2082 27.5 17.2249C27.5 16.2416 27.8333 15.4166 28.5 14.7499C29.1667 14.0832 29.9917 13.7499 30.975 13.7499C31.9583 13.7499 32.7833 14.0832 33.45 14.7499C34.1167 15.4166 34.45 16.2416 34.45 17.2249C34.45 18.2082 34.1167 19.0332 33.45 19.6999C32.7833 20.3666 31.9583 20.6999 30.975 20.6999C29.9917 20.6999 29.1667 20.3666 28.5 19.6999ZM27.75 38.8499L33.2 33.3999L32.4 29.4499C31.3333 30.2166 30.2167 30.9416 29.05 31.6249C27.8833 32.3082 26.7 32.9499 25.5 33.5499L27.75 38.8499ZM44.05 4.1499C44.35 8.68323 43.7833 12.8166 42.35 16.5499C40.9167 20.2832 38.55 23.7999 35.25 27.0999L35.05 27.2999L36.15 32.7999C36.25 33.2999 36.225 33.7832 36.075 34.2499C35.925 34.7166 35.6667 35.1332 35.3 35.4999L26.75 44.0999L22.5 34.1999L14 25.6999L4.1 21.4499L12.7 12.8999C13.0667 12.5332 13.4833 12.2749 13.95 12.1249C14.4167 11.9749 14.9 11.9499 15.4 12.0499L20.9 13.1499C20.9333 13.1166 20.9667 13.0916 21 13.0749C21.0333 13.0582 21.0667 13.0332 21.1 12.9999C24.4 9.6999 27.9167 7.3249 31.65 5.8749C35.3833 4.4249 39.5167 3.8499 44.05 4.1499ZM7.45 31.7499C8.61667 30.5832 10.0417 29.9916 11.725 29.9749C13.4083 29.9582 14.8333 30.5332 16 31.6999C17.1667 32.8666 17.7417 34.2916 17.725 35.9749C17.7083 37.6582 17.1167 39.0832 15.95 40.2499C15.0833 41.1166 13.7417 41.8332 11.925 42.3999C10.1083 42.9666 7.38333 43.4999 3.75 43.9999C4.25 40.3666 4.775 37.6332 5.325 35.7999C5.875 33.9666 6.58333 32.6166 7.45 31.7499ZM9.55 33.8999C9.08333 34.3999 8.66667 35.1832 8.3 36.2499C7.93333 37.3166 7.61667 38.6832 7.35 40.3499C9.01667 40.0832 10.3833 39.7666 11.45 39.3999C12.5167 39.0332 13.3 38.6166 13.8 38.1499C14.4333 37.5832 14.7583 36.8749 14.775 36.0249C14.7917 35.1749 14.5 34.4332 13.9 33.7999C13.2667 33.1999 12.525 32.9082 11.675 32.9249C10.825 32.9416 10.1167 33.2666 9.55 33.8999Z"
23+
fill={'currentColor'}
24+
/>
25+
</G>
26+
</Svg>
27+
)
28+
}
29+
30+
const IconRocket = memo<IconProps>(themed(Rocket))
31+
export { IconRocket }

packages/app/features/account/screen.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import {
2020
IconShare,
2121
IconBadgeCheck,
2222
IconArrowRight,
23-
IconLeaderboard,
2423
} from 'app/components/icons'
2524
import { getReferralHref } from 'app/utils/getReferralLink'
2625
import { useUser } from 'app/utils/useUser'
@@ -30,6 +29,7 @@ import { useRootScreenParams } from 'app/routers/params'
3029
import { type PropsWithChildren, type ReactNode, useEffect, useState } from 'react'
3130
import { useConfirmedTags } from 'app/utils/tags'
3231
import { useUserReferralsCount } from 'app/utils/useUserReferralsCount'
32+
import { IconRocket } from 'app/components/icons/IconRocket'
3333

3434
export function AccountScreen() {
3535
const media = useMedia()
@@ -107,9 +107,9 @@ export function AccountScreen() {
107107
icon: <IconStarOutline size={20} $theme-light={{ color: '$color12' }} />,
108108
},
109109
{
110-
label: 'Leaderboard',
111-
href: '/leaderboard',
112-
icon: <IconLeaderboard size={20} $theme-light={{ color: '$color12' }} />,
110+
label: 'Affiliate',
111+
href: '/account/affiliate',
112+
icon: <IconRocket size={24} $theme-light={{ color: '$color12' }} />,
113113
},
114114
]
115115

0 commit comments

Comments
 (0)