1- import { useEffect , useCallback } from 'react'
1+ import { useCallback , useEffect } from 'react'
22
33import { useTrendingWinners } from '@audius/common/api'
44import {
@@ -22,6 +22,10 @@ import EndOfLineup from 'components/lineup/EndOfLineup'
2222import Lineup from 'components/lineup/Lineup'
2323import { useLineupProps } from 'components/lineup/hooks'
2424import { LineupVariant } from 'components/lineup/types'
25+ import { TrackTile as DesktopTrackTile } from 'components/track/desktop/TrackTile'
26+ import { TrackTile as MobileTrackTile } from 'components/track/mobile/TrackTile'
27+ import { TrackTileSize } from 'components/track/types'
28+ import { useIsMobile } from 'hooks/useIsMobile'
2529
2630const { getLineup } = trendingWinnersPageLineupSelectors
2731
@@ -95,6 +99,8 @@ export const WinnersView = ({
9599 const lineupProps = useTrendingWinnersLineup (
96100 containerRef ?. current ?? undefined
97101 )
102+ const isMobile = useIsMobile ( )
103+ const TrackTileComponent = isMobile ? MobileTrackTile : DesktopTrackTile
98104
99105 useEffect ( ( ) => {
100106 if ( tracks && tracks . length > 0 ) {
@@ -191,10 +197,38 @@ export const WinnersView = ({
191197 </ Paper >
192198
193199 { isPending ? (
194- < Flex column gap = 'm' >
195- { [ 1 , 2 , 3 , 4 , 5 ] . map ( ( i ) => (
196- < Flex key = { i } h = { 128 } alignItems = 'center' gap = 'l' p = 's' />
197- ) ) }
200+ < Flex
201+ column
202+ gap = 'm'
203+ as = 'ul'
204+ css = { { listStyle : 'none' , margin : 0 , padding : 0 } }
205+ >
206+ { Array ( 5 )
207+ . fill ( null )
208+ . map ( ( _ , i ) => (
209+ < Flex
210+ key = { i }
211+ as = 'li'
212+ w = '100%'
213+ css = { { '& > *' : { width : '100%' , minWidth : 0 } } }
214+ >
215+ < TrackTileComponent
216+ uid = { `skeleton-winners-${ i } ` }
217+ id = { - 1 }
218+ index = { i }
219+ size = { TrackTileSize . LARGE }
220+ statSize = 'large'
221+ ordered
222+ togglePlay = { ( ) => { } }
223+ isLoading
224+ hasLoaded = { ( ) => { } }
225+ isTrending
226+ isFeed = { false }
227+ isActive = { false }
228+ noShimmer
229+ />
230+ </ Flex >
231+ ) ) }
198232 </ Flex >
199233 ) : (
200234 < div >
0 commit comments