@@ -41,6 +41,10 @@ async function getData() {
4141 `/top?minGamesThresholdForWinrate=27&since=${ encodeURIComponent ( dayjs ( ) . subtract ( 1 , 'year' ) . toISOString ( ) ) } ` ,
4242 { next : { revalidate : 300 } , cache : 'force-cache' } ,
4343 ) . then ( ( r ) => r . json ( ) )
44+ const topVeryRecentRes : { data : TopPlayers } = await fetchApi (
45+ `/top?minGamesThresholdForWinrate=15&since=${ encodeURIComponent ( dayjs ( ) . subtract ( 1 , 'month' ) . toISOString ( ) ) } ` ,
46+ { next : { revalidate : 300 } , cache : 'force-cache' } ,
47+ ) . then ( ( r ) => r . json ( ) )
4448 const res = await fetchApi ( '/main' , { next : { revalidate : 300 } , cache : 'force-cache' } )
4549 const response : {
4650 data : {
@@ -68,6 +72,7 @@ async function getData() {
6872 topPlayers : topRes . data ,
6973 topPlayersWithManyGames : topWithManyGamesRes . data ,
7074 topPlayersRecent : topRecentRes . data ,
75+ topPlayersVeryRecent : topVeryRecentRes . data ,
7176 nickname : sample ( nicknames ) ?? '' ,
7277 }
7378}
@@ -89,6 +94,6 @@ type TopPlayers = {
8994 winsTotal : number
9095 minGamesThresholdForWinrate : number
9196 byWins : Array < Pick < Player , 'name' > & { wins : number } >
92- byWinrate : Array < Pick < Player , 'name' > & { winrate : number } >
97+ byWinrate : Array < Pick < Player , 'name' > & { winrate : number ; games : number } >
9398 byTitles : Array < Pick < Player , 'name' > & { titles : number } >
9499}
0 commit comments