fix box error

This commit is contained in:
Ste Vaidis 2023-01-13 16:50:47 +02:00
parent 83fce98e50
commit 49f85918ab

View File

@ -27,7 +27,7 @@ const CoinList = (): JSX.Element => {
const { data: globalData, isLoading: globalIsLoading, isSuccess: lobalSuccess } = useGetGlobalQuery(); const { data: globalData, isLoading: globalIsLoading, isSuccess: lobalSuccess } = useGetGlobalQuery();
return ( return (
<Box className="coin-list"> <>
{isLoading || globalIsLoading && <div>Loading...</div>} {isLoading || globalIsLoading && <div>Loading...</div>}
{ {
globalData && globalData &&
@ -38,6 +38,7 @@ const CoinList = (): JSX.Element => {
} }
{ {
data && isSuccess && data && isSuccess &&
<Box className="coin-list">
<TableContainer style={{ marginTop: 20 }}> <TableContainer style={{ marginTop: 20 }}>
<Table size="small" aria-label="simple table"> <Table size="small" aria-label="simple table">
<TableHead> <TableHead>
@ -116,9 +117,10 @@ const CoinList = (): JSX.Element => {
</TableBody> </TableBody>
</Table> </Table>
</TableContainer> </TableContainer>
</Box>
} }
<Pager page={page} per_page={per_page}/> <Pager page={page} per_page={per_page}/>
</Box> </>
) )
} }