Files
blitzkit/packages/website/src/components/Plugs.tsx
T

41 lines
1.1 KiB
TypeScript
Raw Normal View History

2025-09-02 16:24:13 -05:00
import { assertSecret } from "@blitzkit/core";
import { ArrowRightIcon } from "@radix-ui/react-icons";
import { Button, Code, Flex, Link, Text } from "@radix-ui/themes";
2024-09-01 20:53:44 -05:00
export function Plugs() {
2024-10-20 01:01:54 -05:00
const promoteOpentest =
2025-09-02 16:24:13 -05:00
assertSecret(import.meta.env.PUBLIC_PROMOTE_OPENTEST) === "true" &&
assertSecret(import.meta.env.PUBLIC_BRANCH) !== "opentest";
2024-10-20 01:01:54 -05:00
const promotions = [promoteOpentest];
if (promotions.every((promotion) => !promotion)) return null;
2024-09-01 20:53:44 -05:00
return (
<Flex
align="center"
direction="column"
justify="center"
px="4"
py="8"
gap="6"
>
2024-10-20 01:01:54 -05:00
{promoteOpentest && (
<Flex direction="column" gap="3" align="center">
<Text size="5">
2025-09-02 16:24:13 -05:00
BlitzKit{" "}
2024-11-24 20:30:42 -06:00
<Code variant="outline" size="4" color="gray">
2024-10-20 01:01:54 -05:00
opentest
2025-09-02 16:24:13 -05:00
</Code>{" "}
is available now{" "}
2024-10-20 01:01:54 -05:00
</Text>
2024-09-04 22:16:31 -05:00
2024-10-20 01:01:54 -05:00
<Link href="https://opentest.blitzkit.app/" target="_blank">
<Button color="green">
BlitzKit opentest <ArrowRightIcon />
</Button>
</Link>
</Flex>
)}
2024-09-01 20:53:44 -05:00
</Flex>
);
}