Skip to content
Draft
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 19 additions & 13 deletions src/nextapp/components/api-product-item/api-product-item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,15 @@ const ApiProductItem: React.FC<ApiProductItemProps> = ({
<Flex px={9} py={7} bg={'white'} mb={'0.5'}>
<Grid gap={4} flex={1} templateRows="auto" mr={12}>
<GridItem>
<Flex align="center" mb={2}>
<Flex align="center" mt={3}>
<Flex align="center" width={8}>
<Icon
as={isPublic || isTiered ? RiEarthFill : FaLock}
color="bc-blue"
boxSize="5"
data-testid={`product-icon-${kebabCase(data.name)}-${isPublic || isTiered ? 'RiEarthFill' : 'FaLock'}`}
data-testid={`product-icon-${kebabCase(data.name)}-${
isPublic || isTiered ? 'RiEarthFill' : 'FaLock'
}`}
/>
</Flex>
<Heading size="xs">{data.name}</Heading>
Expand All @@ -68,31 +70,35 @@ const ApiProductItem: React.FC<ApiProductItemProps> = ({
)}
</GridItem>
</Grid>
{!isTiered && isGatewayProtected && (
{!isTiered && isGatewayProtected ? (
<AccessRequestForm
disabled={false}
id={id}
name={data.name}
preview={preview}
/>
) : (
<Button
disabled={true}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
disabled={true}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or rather ={false} if we keep that attribute around usually

data-testid="no-api-key-button"
variant={'secondary'}
fontWeight="600"
color="bc-blue"
>
No API key required
</Button>
)}
</Flex>
{isTiered && (
<Flex px={9} py={7} bg={'white'} my={-1} mb={'0.5'}>
<Grid gap={4} flex={1} templateRows="auto" mr={12}>
<Flex px={9} py={7} bg={'white'} my={-8} mb={'0.5'}>
<Grid gap={4} flex={1} templateRows="auto" ml={8} mr={12}>
<GridItem>
<Flex align="center" mb={2}>
<Flex align="center" mt={3}>
<Flex align="center" width={8}>
<Icon as={HiChartBar} color="bc-blue" boxSize="5" />
</Flex>
<Heading size="xs">Limits</Heading>
<Heading size="xs">Elevated Access</Heading>
</Flex>
<Text ml={8} fontSize="sm">
Public access has a rate limit enforced.
</Text>
<Text ml={8} fontSize="sm">
For elevated access, please request access.
</Text>
</GridItem>
</Grid>
<AccessRequestForm
Expand Down