Skip to content

Commit

Permalink
Fix text for singular gateway
Browse files Browse the repository at this point in the history
  • Loading branch information
Elson9 committed Jun 6, 2024
1 parent 90e999b commit bab2cb9
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions src/nextapp/pages/manager/gateways/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,21 @@ const MyGatewaysPage: React.FC = () => {
<option value="option3">Publishing enabled</option>
</Select>
<InputGroup>
<Input variant='outline' placeholder="Search by display name or ID" />
<InputRightElement children={<Icon as={FaSearch} color="#737373" />} />
<Input
variant="outline"
placeholder="Search by display name or ID"
/>
<InputRightElement
children={<Icon as={FaSearch} color="#737373" />}
/>
</InputGroup>
</Flex>
{data && <Text mb={4}>{data.allNamespaces.length} gateways </Text>}
{data &&
(data.allNamespaces.length === 1 ? (
<Text mb={4}>{data.allNamespaces.length} gateway</Text>
) : (
<Text mb={4}>{data.allNamespaces.length} gateways</Text>
))}
{data &&
data.allNamespaces.map((namespace) => (
<Flex
Expand All @@ -194,7 +204,9 @@ const MyGatewaysPage: React.FC = () => {
color="bc-blue"
onClick={handleNamespaceChange(namespace)}
>
{namespace.displayName ? namespace.displayName : namespace.name}
{namespace.displayName
? namespace.displayName
: namespace.name}
</Link>
<Text fontSize="md" pl={8}>
{namespace.name}
Expand Down

0 comments on commit bab2cb9

Please sign in to comment.