Skip to content

Commit

Permalink
wrap button in <Flex />
Browse files Browse the repository at this point in the history
  • Loading branch information
gregrickaby committed Mar 2, 2023
1 parent 976a7fd commit 0f01746
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions components/Results.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
Button,
Card,
createStyles,
Flex,
SimpleGrid
} from '@mantine/core'
import dynamic from 'next/dynamic'
Expand Down Expand Up @@ -36,11 +37,6 @@ const useStyles = createStyles((theme) => ({
borderBottom: '1px solid transparent',
textDecoration: 'none'
}
},

loadMore: {
display: 'flex',
margin: `${theme.spacing.xl}px auto`
}
}))

Expand Down Expand Up @@ -133,9 +129,11 @@ export default function Results() {
))}
</SimpleGrid>
{!loading && (
<Button className={classes.loadMore} ref={ref} onClick={infiniteScroll}>
{loadingMore ? <>Loading...</> : <>Load more</>}
</Button>
<Flex justify="center" align="center" p="xl">
<Button ref={ref} onClick={infiniteScroll}>
{loadingMore ? <>Loading...</> : <>Load more</>}
</Button>
</Flex>
)}
</>
)
Expand Down

0 comments on commit 0f01746

Please sign in to comment.