@@ -2,7 +2,7 @@ import React, { useMemo } from "react";
22import styled from "styled-components" ;
33import { useWindowSize } from "react-use" ;
44import { useParams } from "react-router-dom" ;
5- import Skeleton from "react-loading-skeleton " ;
5+ import { SkeletonDisputeCard , SkeletonDisputeListItem } from "../StyledSkeleton " ;
66import { StandardPagination } from "@kleros/ui-components-library" ;
77import { BREAKPOINT_LANDSCAPE } from "styles/landscapeStyle" ;
88import { useIsList } from "context/IsListProvider" ;
@@ -27,11 +27,6 @@ const ListContainer = styled.div`
2727 gap: 8px;
2828` ;
2929
30- const StyledSkeleton = styled ( Skeleton ) `
31- height: 260px;
32- width: 310px;
33- ` ;
34-
3530// 24px as margin-top since we already have 8px from the flex gap
3631const StyledPagination = styled ( StandardPagination ) `
3732 margin-top: 24px;
@@ -61,15 +56,15 @@ const CasesGrid: React.FC<ICasesGrid> = ({ disputes, casesPerPage, totalPages, c
6156 < ListContainer >
6257 < CasesListHeader />
6358 { isUndefined ( disputes )
64- ? [ ...Array ( casesPerPage ) ] . map ( ( _ , i ) => < StyledSkeleton key = { i } /> )
59+ ? [ ...Array ( casesPerPage ) ] . map ( ( _ , i ) => < SkeletonDisputeListItem key = { i } /> )
6560 : disputes . map ( ( dispute ) => {
6661 return < DisputeCard key = { dispute . id } { ...dispute } /> ;
6762 } ) }
6863 </ ListContainer >
6964 ) : (
7065 < GridContainer >
7166 { isUndefined ( disputes )
72- ? [ ...Array ( casesPerPage ) ] . map ( ( _ , i ) => < StyledSkeleton key = { i } /> )
67+ ? [ ...Array ( casesPerPage ) ] . map ( ( _ , i ) => < SkeletonDisputeCard key = { i } /> )
7368 : disputes . map ( ( dispute ) => {
7469 return < DisputeCard key = { dispute . id } { ...dispute } overrideIsList /> ;
7570 } ) }
0 commit comments