Skip to content

Commit

Permalink
Don't display Routes title when there are no routes (#2858)
Browse files Browse the repository at this point in the history
Fixes #2856
  • Loading branch information
kev1n-peters authored Oct 17, 2024
1 parent 9941f1b commit 5071501
Showing 1 changed file with 18 additions and 16 deletions.
34 changes: 18 additions & 16 deletions wormhole-connect/src/views/v2/Bridge/Routes/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,22 +143,24 @@ const Routes = ({ ...props }: Props) => {

return (
<>
<Box sx={{ display: 'flex', width: '100%' }}>
<Typography
align="left"
fontSize={16}
paddingBottom={0}
marginTop="8px"
marginBottom={0}
width="100%"
textAlign="left"
>
Routes
</Typography>
{props.isLoading ? (
<CircularProgress sx={{ alignSelf: 'flex-end' }} size={20} />
) : null}
</Box>
{props.isLoading || renderRoutes.length > 0 ? (
<Box sx={{ display: 'flex', width: '100%' }}>
<Typography
align="left"
fontSize={16}
paddingBottom={0}
marginTop="8px"
marginBottom={0}
width="100%"
textAlign="left"
>
Routes
</Typography>
{props.isLoading ? (
<CircularProgress sx={{ alignSelf: 'flex-end' }} size={20} />
) : null}
</Box>
) : null}

{props.isLoading && renderRoutes.length === 0 ? (
<Skeleton variant="rounded" height={153} width="100%" />
Expand Down

0 comments on commit 5071501

Please sign in to comment.