@@ -81,6 +81,7 @@ export function HomeScreen() {
8181 < HomeBody
8282 key = "home-body"
8383 animation = "200ms"
84+ animateOnly = { [ 'opacity' , 'transform' ] }
8485 enterStyle = { {
8586 opacity : 0 ,
8687 y : media . gtLg ? 0 : 300 ,
@@ -133,7 +134,7 @@ function HomeBody(props: XStackProps) {
133134 </ StablesBalanceCard . Footer >
134135 </ StablesBalanceCard >
135136 < SavingsBalanceCard href = "/earn" w = "100%" />
136- < InvestmentsBalanceCard padded size = "$5" gap = "$3" w = "100%" >
137+ < InvestmentsBalanceCard padded gap = "$3" w = "100%" >
137138 < InvestmentsBalanceCard . HomeScreenHeader />
138139 < Card . Footer jc = "space-between" ai = "center" >
139140 < YStack gap = "$3" >
@@ -151,20 +152,22 @@ function HomeBody(props: XStackProps) {
151152 < FriendsCard href = "/account/affiliate" />
152153 </ HomeBodyCardRow >
153154 </ YStack >
154- { ( ( ) => {
155- switch ( true ) {
156- case Platform . OS !== 'web' :
157- return null
158- case selectedCoin !== undefined :
159- return < TokenDetails />
160- case queryParams . token === 'investments' :
161- return < InvestmentsBody />
162- case queryParams . token === 'stables' :
163- return < StablesBody />
164- default :
165- return null
166- }
167- } ) ( ) }
155+ < AnimatePresence >
156+ { ( ( ) => {
157+ switch ( true ) {
158+ case Platform . OS !== 'web' :
159+ return null
160+ case selectedCoin !== undefined :
161+ return < TokenDetails />
162+ case queryParams . token === 'investments' :
163+ return < InvestmentsBody />
164+ case queryParams . token === 'stables' :
165+ return < StablesBody />
166+ default :
167+ return null
168+ }
169+ } ) ( ) }
170+ </ AnimatePresence >
168171 </ XStack >
169172 </ IsPriceHiddenProvider >
170173 )
@@ -213,8 +216,27 @@ export function InvestmentsBody() {
213216 const formattedDeltaUSD = localizeAmount ( Math . abs ( delta24hUSD ) . toFixed ( 2 ) )
214217 const sign = delta24hUSD >= 0 ? '+' : '-'
215218
219+ const media = useMedia ( )
220+
216221 return (
217- < YStack ai = "center" $gtXs = { { gap : '$3' } } gap = { '$3.5' } f = { 1 } >
222+ < YStack
223+ key = { media . gtLg ? 'investments-body-lg' : 'investments-body-xs' }
224+ { ...( media . gtLg && {
225+ animation : '100ms' ,
226+ enterStyle : {
227+ o : 0 ,
228+ x : - 30 ,
229+ } ,
230+ exitStyle : {
231+ o : 0 ,
232+ x : - 20 ,
233+ } ,
234+ } ) }
235+ ai = "center"
236+ $gtXs = { { gap : '$3' } }
237+ gap = { '$3.5' }
238+ f = { 1 }
239+ >
218240 < InvestmentsPortfolioCard padded size = "$6" w = "100%" mah = { 220 } gap = "$5" >
219241 < Card . Header p = { 0 } >
220242 < Paragraph
@@ -313,9 +335,7 @@ export function InvestmentsBody() {
313335
314336 { /* Holdings list */ }
315337 < YStack w = { '100%' } gap = { '$2' } >
316- < H4 fontWeight = { 600 } size = { '$7' } >
317- Your Holdings
318- </ H4 >
338+ < H4 size = "$7" > Your Holdings</ H4 >
319339 < Card
320340 bc = { '$color1' }
321341 width = "100%"
@@ -356,13 +376,30 @@ export function InvestmentsBody() {
356376 )
357377}
358378
359- export function StablesBody ( ) {
379+ export const StablesBody = YStack . styleable ( ( props ) => {
360380 const media = useMedia ( )
361381
362382 return (
363- < YStack $gtXs = { { gap : '$3' } } gap = { '$3.5' } f = { 1 } >
383+ < YStack
384+ key = { media . gtLg ? 'stables-body-lg' : 'stables-body-xs' }
385+ { ...( media . gtLg && {
386+ animation : '100ms' ,
387+ enterStyle : {
388+ o : 0 ,
389+ x : - 30 ,
390+ } ,
391+ exitStyle : {
392+ o : 0 ,
393+ x : - 20 ,
394+ } ,
395+ } ) }
396+ $gtXs = { { gap : '$3' } }
397+ gap = { '$3.5' }
398+ f = { 1 }
399+ { ...props }
400+ >
364401 { media . lg && (
365- < StablesBalanceCard >
402+ < StablesBalanceCard materialInteractive = { false } >
366403 < StablesBalanceCard . StablesScreenHeader />
367404 < StablesBalanceCard . Footer >
368405 < StablesBalanceCard . Balance />
@@ -381,14 +418,17 @@ export function StablesBody() {
381418 </ Card >
382419 </ YStack >
383420 )
384- }
421+ } )
422+
423+ StablesBody . displayName = 'StablesBody'
385424
386425export const HomeBodyCard = styled ( Card , {
387426 size : '$5' ,
388427 br : '$7' ,
389428 f : 1 ,
390429 mah : 150 ,
391430 p : '$1.5' ,
431+ materialInteractive : true ,
392432} )
393433
394434export const HomeBodyCardRow = styled ( XStack , {
0 commit comments