Skip to content

Commit

Permalink
Use count of 0 instead of EmptyCell for route count
Browse files Browse the repository at this point in the history
  • Loading branch information
charliepark committed Dec 13, 2024
1 parent 46ef5d8 commit 64a7bbe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions app/pages/project/vpcs/VpcPage/tabs/VpcGatewaysTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,8 @@ const GatewayIpPoolCell = (gatewaySelector: PP.VpcInternetGateway) => {

const GatewayRoutes = ({ project, vpc, gateway }: PP.VpcInternetGateway) => {
const matchingRoutes = useGatewayRoutes({ project, vpc, gateway })
if (!matchingRoutes?.length) return <EmptyCell />
const to = pb.vpcInternetGateway({ project, vpc, gateway })
return <LinkCell to={to}>{matchingRoutes.length}</LinkCell>
return <LinkCell to={to}>{matchingRoutes?.length || 0}</LinkCell>
}

const colHelper = createColumnHelper<InternetGateway>()
Expand Down
2 changes: 1 addition & 1 deletion app/pages/project/vpcs/internet-gateway-edit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import {

const RoutesEmpty = () => (
<Table.Row>
<Table.Cell colSpan={2} className="bg-secondary">
<Table.Cell colSpan={2} className="!bg-raise">
No VPC router routes target this gateway.
</Table.Cell>
</Table.Row>
Expand Down

0 comments on commit 64a7bbe

Please sign in to comment.