---
import { assertSecret, imgur, ImgurSize } from '@blitzkit/core';
import {
Cross1Icon,
DiscordLogoIcon,
GearIcon,
HamburgerMenuIcon,
} from '@radix-ui/react-icons';
import {
Box,
Code,
Flex,
Grid,
IconButton,
Link,
ScrollArea,
Separator,
Text,
} from '@radix-ui/themes';
import { resolveBranchName } from '../core/blitzkit/branches';
import { homeTool, TOOLS } from '../constants/tools';
import { NavbarAccount } from './NavbarAccount';
const toolsFiltered = TOOLS.filter((tool) => !('href' in tool));
const tools = [homeTool, ...toolsFiltered];
const branchName = resolveBranchName();
const isBranchNamed = branchName !== undefined;
---
BlitzKit
{
isBranchNamed && (
{branchName}
)
}
{
toolsFiltered.map((tool, index) => {
const unavailableOnBranch = tool.branches?.every(
(branch) =>
branch !== assertSecret(import.meta.env.PUBLIC_ASSET_BRANCH),
);
const selected = Astro.url.pathname.startsWith(
`/tools/${tool.id}`,
);
if (unavailableOnBranch) return null;
return (
{index > 0 && }
{tool.title}
);
})
}
{
tools.map((tool) => {
const unavailableOnBranch = tool.branches?.every(
(branch) =>
branch !== assertSecret(import.meta.env.PUBLIC_ASSET_BRANCH),
);
if (unavailableOnBranch) return null;
return (
{tool.title}
);
})
}