Skip to content

Commit 6145f95

Browse files
committed
rewards landing
1 parent d6997bb commit 6145f95

File tree

2 files changed

+108
-17
lines changed

2 files changed

+108
-17
lines changed

apps/next/pages/account/rewards.tsx

+3-17
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { RewardsScreen } from 'app/features/account/rewards/screen'
1+
import { LandingScreen } from 'app/features/account/rewards/landing/screen'
22
import Head from 'next/head'
33
import { userProtectedGetSSP } from 'utils/userProtected'
44
import type { NextPageWithLayout } from 'next-app/pages/_app'
@@ -11,28 +11,14 @@ export const Page: NextPageWithLayout = () => {
1111
<Head>
1212
<title>Send | Send Rewards</title>
1313
</Head>
14-
<RewardsScreen />
14+
<LandingScreen />
1515
</>
1616
)
1717
}
1818

1919
export const getServerSideProps = userProtectedGetSSP()
20-
21-
const subheader =
22-
'Register at least 1 Sendtag, maintain the minimum balance, avoid selling, and refer others for a bonus multiplier. '
23-
2420
Page.getLayout = (children) => (
25-
<HomeLayout
26-
$platform-web={{
27-
h: '100svh',
28-
contentContainerStyle: {
29-
h: '100svh',
30-
},
31-
}}
32-
TopNav={
33-
<TopNav header="Send Rewards" showLogo subheader={subheader} button={ButtonOption.PROFILE} />
34-
}
35-
>
21+
<HomeLayout TopNav={<TopNav header="Send Rewards" button={ButtonOption.PROFILE} />}>
3622
{children}
3723
</HomeLayout>
3824
)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
import {
2+
YStack,
3+
H1,
4+
Card,
5+
Paragraph,
6+
H2,
7+
XStack,
8+
Separator,
9+
LinkableButton,
10+
Button,
11+
Image,
12+
LinearGradient,
13+
} from '@my/ui'
14+
import { IconArrowRight, IconSLogo } from 'app/components/icons'
15+
16+
export function LandingScreen() {
17+
return (
18+
<YStack pt={'$size.3.5'} $gtLg={{ pt: 0 }} f={1}>
19+
<YStack pb={'$size.3.5'}>
20+
<Card width={'100%'} p={'$size.3.5'} maw={1200}>
21+
<YStack w={'100%'} mb={'$size.6'} gap={'$size.0.9'}>
22+
<H1 size={'$9'} fontWeight={'600'} color="$color12" tt={'uppercase'}>
23+
Send Rewards
24+
</H1>
25+
<Paragraph color={'$color10'} size={'$5'}>
26+
Participate in the Send Ecosystem and earn Send Tokens. Your Network! Your Rewards!
27+
</Paragraph>
28+
</YStack>
29+
30+
<YStack $gtLg={{ flexDirection: 'row' }} gap={'$size.3.5'}>
31+
{/* @TODO: href, reward */}
32+
<Section title="Activity Rewards" href="/" reward="120,000 SEND" />
33+
<Section title="Lock &amp; Earn" href="/" reward="120,000 SEND" />
34+
</YStack>
35+
</Card>
36+
</YStack>
37+
</YStack>
38+
)
39+
}
40+
41+
const Section = ({
42+
title,
43+
href,
44+
reward,
45+
}: {
46+
title: string
47+
href: string
48+
reward: string
49+
}) => {
50+
return (
51+
<YStack f={1} gap={'$size.2.5'}>
52+
<H2 fontWeight={600} tt={'uppercase'} size={'$7'}>
53+
{title}
54+
</H2>
55+
<YStack pos={'relative'} overflow="hidden" borderRadius={'$6'}>
56+
<Image
57+
pos={'absolute'}
58+
t={0}
59+
source={{
60+
height: 300,
61+
width: 700,
62+
uri: 'https://images.unsplash.com/32/RgJQ82pETlKd0B7QzcJO_5912578701_92397ba76c_b.jpg?q=80&w=1024&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
63+
}}
64+
/>
65+
<LinearGradient
66+
start={[0, 0]}
67+
end={[0, 1]}
68+
fullscreen
69+
colors={['$background', 'transparent', '$background']}
70+
/>
71+
<YStack p="$size.2.5" pt={'$size.1.5'} gap={'$size.10'}>
72+
<XStack pb={'$size.0.75'} gap={6} ai="center">
73+
<IconSLogo size={20} color="$primary" mt={-4} />
74+
<Paragraph tt={'uppercase'} fontWeight={600} size={'$5'}>
75+
Rewards
76+
</Paragraph>
77+
</XStack>
78+
79+
<XStack gap={'$size.1'} jc="space-between">
80+
<YStack>
81+
<Paragraph fontWeight={500} color={'$color10'} size={'$5'}>
82+
Claimable
83+
</Paragraph>
84+
<Paragraph fontWeight={600} size={'$10'}>
85+
{reward}
86+
</Paragraph>
87+
</YStack>
88+
89+
<XStack gap={'$size.2'}>
90+
<Separator vertical />
91+
92+
<YStack jc="center">
93+
<LinkableButton href={href} unstyled borderRadius={'$3'} p={'$size.0.5'}>
94+
<Button.Icon>
95+
<IconArrowRight size={26} color={'$primary'} />
96+
</Button.Icon>
97+
</LinkableButton>
98+
</YStack>
99+
</XStack>
100+
</XStack>
101+
</YStack>
102+
</YStack>
103+
</YStack>
104+
)
105+
}

0 commit comments

Comments
 (0)