mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 10:47:04 +02:00
feat: labels
This commit is contained in:
1 parent
5da177e520
commit
71af5d2166
3 files changed
+19
-6
No files matched your search
@@ -0,0 +1,4 @@
|
||||
export const BRANCH_NAMES: Record<string, string> = {
|
||||
dev: 'Beta',
|
||||
opentest: 'Opentest',
|
||||
};
|
||||
@@ -1,10 +1,6 @@
|
||||
import { Code, Flex, Heading, Text } from '@radix-ui/themes';
|
||||
import { imgur } from '../../core/blitzkit/imgur';
|
||||
|
||||
const BRANCH_NAMES: Record<string, string> = {
|
||||
dev: 'Beta',
|
||||
opentest: 'Opentest',
|
||||
};
|
||||
import { imgur } from '../../../core/blitzkit/imgur';
|
||||
import { BRANCH_NAMES } from './constants';
|
||||
|
||||
export function Hero() {
|
||||
const isBranchNamed =
|
||||
@@ -10,6 +10,7 @@ import {
|
||||
import {
|
||||
Box,
|
||||
Button,
|
||||
Code,
|
||||
Dialog,
|
||||
Flex,
|
||||
Grid,
|
||||
@@ -22,6 +23,7 @@ import {
|
||||
} from '@radix-ui/themes';
|
||||
import { usePathname } from 'next/navigation';
|
||||
import { Fragment, useState } from 'react';
|
||||
import { BRANCH_NAMES } from '../../app/components/Hero/constants';
|
||||
import { REGIONS } from '../../constants/regions';
|
||||
import { homeTool, TOOLS } from '../../constants/tools';
|
||||
import { WARGAMING_APPLICATION_ID } from '../../constants/wargamingApplicationID';
|
||||
@@ -40,6 +42,9 @@ export default function Navbar() {
|
||||
const logins = App.use((state) => state.logins);
|
||||
const mutateApp = App.useMutation();
|
||||
const tools = [homeTool, ...TOOLS];
|
||||
const isBranchNamed =
|
||||
process.env.NEXT_PUBLIC_ASSET_BRANCH &&
|
||||
BRANCH_NAMES[process.env.NEXT_PUBLIC_ASSET_BRANCH];
|
||||
|
||||
return (
|
||||
<Flex className={styles.navbar}>
|
||||
@@ -73,6 +78,14 @@ export default function Navbar() {
|
||||
onClick={() => setShowHamburgerMenu(false)}
|
||||
>
|
||||
BlitzKit
|
||||
{isBranchNamed && (
|
||||
<>
|
||||
{' '}
|
||||
<Code color="gray" highContrast variant="solid">
|
||||
{BRANCH_NAMES[process.env.NEXT_PUBLIC_ASSET_BRANCH!]}
|
||||
</Code>
|
||||
</>
|
||||
)}
|
||||
</Link>
|
||||
</Flex>
|
||||
|
||||
|
||||
Reference in new issue
Block a user