Skip to content

Commit c3539bc

Browse files
authored
Merge pull request #1034 from vr-varad/fix/responsive_issue_catalog_2
Fix: Carousel For Performance Section
2 parents 4b0318e + c974b01 commit c3539bc

File tree

2 files changed

+15
-14
lines changed

2 files changed

+15
-14
lines changed

src/custom/PerformersSection/PerformersSection.tsx

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
TropyIcon
1010
} from '../../icons';
1111
import { useTheme } from '../../theme';
12+
import { Carousel } from '../Carousel';
1213
import { Pattern } from '../CustomCatalog/CustomCard';
1314
import { ErrorBoundary } from '../ErrorBoundary';
1415
import { StateCardSekeleton } from './PerformersToogleButton';
@@ -284,6 +285,17 @@ const PerformersSection: React.FC<PerformersSectionProps> = ({
284285
</MainContainer>
285286
);
286287

288+
const statComponents = stats.map((stat, index) => (
289+
<StatCard
290+
key={`${stat.id}-${index}`}
291+
{...stat}
292+
onCardClick={onCardClick}
293+
onIconClick={onIconClick}
294+
onAuthorClick={onAuthorClick}
295+
onStatusClick={onStatusClick}
296+
/>
297+
));
298+
287299
return (
288300
<ErrorBoundary>
289301
<MainContainer>
@@ -299,17 +311,7 @@ const PerformersSection: React.FC<PerformersSectionProps> = ({
299311
</Title>
300312
<CardsContainer>
301313
{isLoading && <StateCardSekeleton />}
302-
{!isLoading &&
303-
stats.map((stat, index) => (
304-
<StatCard
305-
key={`${stat.id}-${index}`}
306-
{...stat}
307-
onCardClick={onCardClick}
308-
onIconClick={onIconClick}
309-
onAuthorClick={onAuthorClick}
310-
onStatusClick={onStatusClick}
311-
/>
312-
))}
314+
<Carousel items={statComponents} />
313315
</CardsContainer>
314316
</MainContainer>
315317
</ErrorBoundary>

src/custom/PerformersSection/styles.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,10 +222,9 @@ export const UserNameText = styled(Typography)(({ theme }) => ({
222222

223223
export const CardsContainer = styled(Box)(({ theme }) => ({
224224
display: 'flex',
225-
gap: '18px',
225+
gap: '15px',
226226
width: '100%',
227-
overflowX: 'auto',
228-
padding: '18px',
227+
padding: '20px',
229228
background:
230229
theme.palette.mode === 'light'
231230
? theme.palette.background.default

0 commit comments

Comments
 (0)