@@ -27,6 +27,10 @@ const StyledTitle = styled.h1`
2727 margin-bottom: 20px;
2828` ;
2929
30+ const NoHistoryLabel = styled . label `
31+ font-size: ${ responsiveSize ( 14 , 16 ) } ;
32+ ` ;
33+
3034interface IStakingHistory {
3135 searchParamAddress : `0x${string } `;
3236 totalNumberStakingEvents : number ;
@@ -38,7 +42,6 @@ const StakingHistory: React.FC<IStakingHistory> = ({ searchParamAddress, totalNu
3842 const eventsPerPage = 10 ;
3943 const currentPage = parseInt ( page ?? "1" ) ;
4044 const skip = ( currentPage - 1 ) * eventsPerPage ;
41-
4245 const { data : stakingHistoryData , isLoading : isLoadingStakingHistory } = useStakingHistory ( eventsPerPage , skip ) ;
4346 const { data : courtTreeData , isLoading : isLoadingCourtTree } = useCourtTree ( ) ;
4447 const stakingEvents = stakingHistoryData ?. data ?. userStakingEvents ?. edges ?? [ ] ;
@@ -52,7 +55,9 @@ const StakingHistory: React.FC<IStakingHistory> = ({ searchParamAddress, totalNu
5255 < Container >
5356 < StyledTitle > Staking History</ StyledTitle >
5457 < CourtCardsContainer >
55- { isLoadingStakingHistory || isLoadingCourtTree ? (
58+ { ! isLoadingStakingHistory && totalNumberStakingEvents === 0 ? (
59+ < NoHistoryLabel > No history found</ NoHistoryLabel >
60+ ) : isLoadingStakingHistory || isLoadingCourtTree ? (
5661 Array . from ( { length : 10 } ) . map ( ( _ , index ) => < Skeleton height = { 64 } key = { index } /> )
5762 ) : (
5863 < >
0 commit comments