add extra condition to Pager when pages is equal 0

This commit is contained in:
mattyl006 2022-07-29 09:00:50 +02:00
parent f62d64dd77
commit cb69dc4c13

View File

@ -56,7 +56,8 @@ const Pager = (props) => {
backgroundColor={(props.pageNr === 1) ? 'transparent' : theme.colors.dark}/>
<CircleNumber number={props.pageNr}/>
<RightArrow as='button' src={polygon} onClick={props.nextPage} size='cover'
backgroundColor={(props.pageNr === props.pages) ? 'transparent' : theme.colors.dark}/>
backgroundColor={(props.pageNr === props.pages || props.pages === 0)
? 'transparent' : theme.colors.dark}/>
</PagerStyle>
);
}