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> </GridItem>
)} )}
</Grid> </Grid>
<Button onClick={() => handleMoreOrLess()}> {posts.length > pageSize && (
{page * pageSize < posts.length ? 'Load More' : 'Show Less'} <Button onClick={() => handleMoreOrLess()}>
</Button> {page * pageSize < posts.length ? 'Load More' : 'Show Less'}
</Button>
)}
</div> </div>
) )
} }