--- import { assertSecret } from '@blitzkit/core'; import { CaretRightIcon } from '@radix-ui/react-icons'; import { Box, Button, Code, Flex, Heading, Text } from '@radix-ui/themes'; import type { Tool } from '../constants/tools'; import { getStrings } from '../core/i18n/getStrings'; import { LinkI18n } from './LinkI18n'; interface Props { tool: Tool; } const { tool } = Astro.props; const disabled = tool.branches?.every( (branch) => branch !== assertSecret(import.meta.env.PUBLIC_BRANCH), ); const { locale } = Astro.params; const strings = getStrings(locale); const toolStrings = strings.website.tools[ (tool.stringsId ?? tool.id) as keyof typeof strings.website.tools ]; --- {toolStrings.name} { disabled ? ( <> Unavailable on{' '} {assertSecret(import.meta.env.PUBLIC_BRANCH)} ) : ( toolStrings.description ) } { !disabled && ( ) }