File tree Expand file tree Collapse file tree
app/components/Views/Homepage/Sections/Predictions Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -391,13 +391,18 @@ const PredictionsSectionDefault = forwardRef<
391391 const hasError =
392392 ! isLoadingPositions &&
393393 ! isLoadingMarkets &&
394+ ! isLoadingClaimable &&
394395 ! hasAnyPositions &&
395396 markets . length === 0 &&
396397 ( positionsError || marketsError ) ;
397398 const isEmpty =
398399 ! isLoading && ! hasAnyPositions && markets . length === 0 && ! hasError ;
399400 const willRender = isPredictEnabled && ! isLoading && ! isEmpty && ! hasError ;
400- const itemCount = hasAnyPositions ? positions . length : markets . length ;
401+ const itemCount = hasPositions
402+ ? positions . length
403+ : hasClaimablePositions
404+ ? markets . length || 1
405+ : markets . length ;
401406
402407 const { onLayout } = useHomeViewedEvent ( {
403408 sectionRef : willRender ? sectionViewRef : null ,
@@ -523,7 +528,11 @@ const PredictionsSectionPositionsOnly = forwardRef<
523528 const hasAnyPositions = hasPositions || hasClaimablePositions ;
524529 const isLoading = isLoadingPositions || isLoadingClaimable ;
525530 const willRender = isPredictEnabled && ! isLoading && hasAnyPositions ;
526- const itemCount = hasAnyPositions ? positions . length : 0 ;
531+ const itemCount = hasPositions
532+ ? positions . length
533+ : hasClaimablePositions
534+ ? 1
535+ : 0 ;
527536
528537 const { onLayout } = useHomeViewedEvent ( {
529538 sectionRef : willRender ? sectionViewRef : null ,
You can’t perform that action at this time.
0 commit comments