feat: branch naming

This commit is contained in:
TrèsAbhi committed 2024-10-12 21:38:48 -05:00
1 parent a06fc87009
commit adf00a0bbd
4 files changed
+26 -14

No files matched your search

@@ -1,11 +1,11 @@
---
import { imgur } from '@blitzkit/core';
import { Code, Flex, Heading, Text } from '@radix-ui/themes';
import { BRANCH_NAMES } from '../constants/branches';
import { undefined } from 'astro:schema';
import { resolveBranchName } from '../core/blitzkit/branches';
const isBranchNamed =
import.meta.env.PUBLIC_ASSET_BRANCH &&
BRANCH_NAMES[import.meta.env.PUBLIC_ASSET_BRANCH];
const branchName = resolveBranchName();
const isBranchNamed = branchName !== undefined;
---
<style>
@@ -58,7 +58,7 @@ const isBranchNamed =
{
isBranchNamed && (
<Code size="8" color="gray" highContrast variant="outline">
{BRANCH_NAMES[import.meta.env.PUBLIC_ASSET_BRANCH!]}
{branchName}
</Code>
)
}