feat: promote aeson

This commit is contained in:
tresabhi committed 2024-11-22 10:50:35 -06:00
1 parent 166c26b65a
commit fa72e8efab
5 files changed
+62 -9

No files matched your search

@@ -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>