This commit is contained in:
amirhouieh 2023-05-14 12:05:30 +02:00 committed by Jinho Jang
parent e7ec1d6357
commit 1f41575d98
1 changed files with 5 additions and 3 deletions

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>
)
}