mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 03:29:51 +02:00
feat: promote aeson
This commit is contained in:
1 parent
166c26b65a
commit
fa72e8efab
5 files changed
+62
-9
No files matched your search
@@ -0,0 +1,32 @@
|
||||
import { imgur } from '@blitzkit/core';
|
||||
import { Flex, Heading, Link, Text } from '@radix-ui/themes';
|
||||
import { Var } from '../core/radix/var';
|
||||
|
||||
export function AesonPlug() {
|
||||
return (
|
||||
<Link
|
||||
color="gray"
|
||||
highContrast
|
||||
href="https://discord.gg/WHdER7ZPAD"
|
||||
underline="hover"
|
||||
>
|
||||
<Flex
|
||||
style={{
|
||||
backgroundColor: Var('green-3'),
|
||||
borderRadius: Var('radius-3'),
|
||||
overflow: 'hidden',
|
||||
}}
|
||||
>
|
||||
<img
|
||||
src={imgur('akrxfFC')}
|
||||
style={{ width: '6rem', height: '6rem', objectFit: 'cover' }}
|
||||
/>
|
||||
|
||||
<Flex py="3" px="5" direction="column" justify="center">
|
||||
<Heading size="5">Preview brought to you by WoT Blitz News</Heading>
|
||||
<Text color="gray">What the hell do I put here haha</Text>
|
||||
</Flex>
|
||||
</Flex>
|
||||
</Link>
|
||||
);
|
||||
}
|
||||
@@ -1,15 +1,19 @@
|
||||
import { assertSecret } from '@blitzkit/core';
|
||||
import { MinusCircledIcon } from '@radix-ui/react-icons';
|
||||
import { Callout, Flex } from '@radix-ui/themes';
|
||||
import { uniq } from 'lodash-es';
|
||||
import { useEffect } from 'react';
|
||||
import { Duel } from '../../stores/duel';
|
||||
import { TankopediaPersistent } from '../../stores/tankopediaPersistent';
|
||||
import { AesonPlug } from '../AesonPlug';
|
||||
import { ExperimentIcon } from '../ExperimentIcon';
|
||||
import { MAX_RECENTLY_VIEWED } from '../TankSearch/constants';
|
||||
|
||||
export function CalloutsSection() {
|
||||
const tank = Duel.use((state) => state.protagonist.tank);
|
||||
const mutateTankopediaPersistent = TankopediaPersistent.useMutation();
|
||||
const promoteAeson =
|
||||
assertSecret(import.meta.env.PUBLIC_ASSET_BRANCH) === 'preview';
|
||||
|
||||
useEffect(() => {
|
||||
mutateTankopediaPersistent((draft) => {
|
||||
@@ -20,10 +24,12 @@ export function CalloutsSection() {
|
||||
});
|
||||
}, [tank]);
|
||||
|
||||
if (!tank.testing && !tank.deprecated) return null;
|
||||
if (!tank.testing && !tank.deprecated && !promoteAeson) return null;
|
||||
|
||||
return (
|
||||
<Flex direction="column" align="center" gap="2" mb="4">
|
||||
<AesonPlug />
|
||||
|
||||
{tank.deprecated && (
|
||||
<Callout.Root color="red">
|
||||
<Callout.Icon>
|
||||
|
||||
Reference in new issue
Block a user