@@ -23,6 +23,7 @@ import { useProfileScreenParams, useRewardsScreenParams } from 'app/routers/para
23
23
import { useMonthlyDistributions } from 'app/utils/distributions'
24
24
import { DistributionClaimButton } from 'app/features/account/rewards/components/DistributionClaimButton'
25
25
import formatAmount from 'app/utils/formatAmount'
26
+ import { LockAndEarnButtons } from 'app/features/account/rewards/lock-and-earn/LockAndEarnButtons'
26
27
27
28
const Row = styled ( XStack , {
28
29
w : '100%' ,
@@ -243,8 +244,60 @@ export const ActivityRewards = ({ children, ...props }: XStackProps) => {
243
244
)
244
245
}
245
246
247
+ export const LockAndEarn = ( { children, ...props } : XStackProps ) => {
248
+ const isPwa = usePwa ( )
249
+ const { isLoading } = useUser ( )
250
+
251
+ const { direction } = useScrollDirection ( )
252
+
253
+ return (
254
+ < >
255
+ { children }
256
+ < AnimatePresence >
257
+ { ! isLoading && direction !== 'down' && (
258
+ < Stack
259
+ w = { '100%' }
260
+ pb = { isPwa ? '$1' : '$5' }
261
+ px = "$4"
262
+ $platform-web = { {
263
+ position : 'fixed' ,
264
+ bottom : 0 ,
265
+ } }
266
+ $gtLg = { {
267
+ display : 'none' ,
268
+ } }
269
+ animation = "200ms"
270
+ opacity = { 1 }
271
+ animateOnly = { [ 'scale' , 'transform' , 'opacity' ] }
272
+ enterStyle = { { opacity : 0 , scale : 0.9 } }
273
+ exitStyle = { { opacity : 0 , scale : 0.95 } }
274
+ pointerEvents = "none"
275
+ >
276
+ < LinearGradient
277
+ h = { '150%' }
278
+ top = { '-50%' }
279
+ start = { { x : 0 , y : 1 } }
280
+ end = { { x : 0 , y : 0 } }
281
+ locations = { [ 0 , 0.33 ] }
282
+ fullscreen
283
+ colors = { [ 'transparent' , '$background' ] }
284
+ $gtLg = { { display : 'none' } }
285
+ />
286
+ < Row { ...props } >
287
+ < Stack w = { 200 } >
288
+ < LockAndEarnButtons . OpenButton />
289
+ </ Stack >
290
+ </ Row >
291
+ </ Stack >
292
+ ) }
293
+ </ AnimatePresence >
294
+ </ >
295
+ )
296
+ }
297
+
246
298
export const MobileButtonRowLayout = {
247
299
Home : Home ,
248
300
Profile : Profile ,
249
301
ActivityRewards : ActivityRewards ,
302
+ LockAndEarn : LockAndEarn ,
250
303
}
0 commit comments