@@ -3,11 +3,11 @@ import { memo, useMemo } from 'react';
3
3
import { Box , Button } from '../../base' ;
4
4
import { iconXSmall } from '../../constants/iconsSizes' ;
5
5
import { LeaderBoardIcon , TropyIcon } from '../../icons' ;
6
- import { useTheme } from '../../theme' ;
6
+ import { useMediaQuery , useTheme } from '../../theme' ;
7
7
import { Carousel } from '../Carousel' ;
8
8
import { Pattern } from '../CustomCatalog/CustomCard' ;
9
9
import { ErrorBoundary } from '../ErrorBoundary' ;
10
- import { StateCardSekeleton } from './PerformersToogleButton' ;
10
+ import { OpenLeaderBoardButton , StateCardSekeleton } from './PerformersToogleButton' ;
11
11
import {
12
12
CardsContainer ,
13
13
ContentWrapper ,
@@ -228,6 +228,7 @@ const PerformersSection: React.FC<PerformersSectionProps> = ({
228
228
} ) => {
229
229
const theme = useTheme ( ) ;
230
230
const { queries, isLoading, hasError } = useMetricQueries ( useGetCatalogFilters ) ;
231
+ const smallScreen = useMediaQuery ( theme . breakpoints . down ( 'sm' ) ) ;
231
232
232
233
const stats = useMemo (
233
234
( ) =>
@@ -265,20 +266,24 @@ const PerformersSection: React.FC<PerformersSectionProps> = ({
265
266
style = { {
266
267
height : '2rem' ,
267
268
width : '2rem' ,
268
- color : theme . palette . icon . secondary
269
+ color : theme . palette . icon . secondary ,
270
+ display : smallScreen ? 'none' : 'inline-flex'
269
271
} }
270
272
/>
271
273
</ Box >
272
274
{ onOpenLeaderboard && (
273
- < Button
274
- variant = "contained"
275
- onClick = { ( ) => onOpenLeaderboard ( ) }
276
- sx = { {
277
- display : { xs : 'none' , md : 'inline-flex' }
278
- } }
279
- >
280
- Open Leaderboard
281
- </ Button >
275
+ < div >
276
+ < Button
277
+ variant = "contained"
278
+ onClick = { ( ) => onOpenLeaderboard ( ) }
279
+ sx = { {
280
+ display : { xs : 'none' , sm : 'inline-flex' }
281
+ } }
282
+ >
283
+ Open Leaderboard
284
+ </ Button >
285
+ < OpenLeaderBoardButton handleClick = { onOpenLeaderboard } />
286
+ </ div >
282
287
) }
283
288
</ TitleBox >
284
289
< CardsContainer >
0 commit comments