This commit is contained in:
amirhouieh 2023-05-14 12:05:30 +02:00
parent e47f492dea
commit f54426164a

View File

@ -68,9 +68,11 @@ export const PostsList = (props: Props) => {
</GridItem>
)}
</Grid>
<Button onClick={() => handleMoreOrLess()}>
{page * pageSize < posts.length ? 'Load More' : 'Show Less'}
</Button>
{posts.length > pageSize && (
<Button onClick={() => handleMoreOrLess()}>
{page * pageSize < posts.length ? 'Load More' : 'Show Less'}
</Button>
)}
</div>
)
}