feat: more migration

This commit is contained in:
TrèsAbhi committed 2024-09-14 19:43:14 -05:00
1 parent a1721eb05e
commit 502dcf4e54
146 files changed
+481 -666

No files matched your search

@@ -1,5 +1,3 @@
'use client';
import { Flex, Heading, Text } from '@radix-ui/themes';
import { useRouter } from 'next/navigation';
import { useEffect } from 'react';
@@ -1,5 +1,3 @@
'use client';
import { assertSecret, idToRegion } from '@blitzkit/core';
import { Button, Flex, Heading, Link, Text } from '@radix-ui/themes';
import { usePathname } from 'next/navigation';
@@ -78,7 +76,7 @@ export function Checks() {
`https://api.worldoftanks.${idToRegion(
wargaming.id,
)}/wot/auth/prolongate/?application_id=${assertSecret(
process.env.NEXT_PUBLIC_WARGAMING_APPLICATION_ID,
process.env.PUBLIC_WARGAMING_APPLICATION_ID,
)}&access_token=${wargaming.token}`,
)
.then((response) => response.json() as Promise<Extension>)
@@ -13,7 +13,7 @@ export default function Page({
const markdown = use(
fetch(
`https://raw.githubusercontent.com/tresabhi/blitzkit/${assertSecret(
process.env.NEXT_PUBLIC_ASSET_BRANCH,
process.env.PUBLIC_ASSET_BRANCH,
)}/docs/${params.directory}/${params.document}.md`,
).then((response) => response.text()),
);
@@ -1,5 +1,3 @@
'use client';
import { Flex, Theme } from '@radix-ui/themes';
import '@radix-ui/themes/styles.css';
import { Roboto_Flex } from 'next/font/google';
@@ -1,5 +1,3 @@
'use client';
import { DiscordLogoIcon, HomeIcon } from '@radix-ui/react-icons';
import { Button, Flex, Heading, Text } from '@radix-ui/themes';
import Link from 'next/link';
+1 -3
View File
@@ -1,7 +1,6 @@
'use client';
import { Flex, Heading } from '@radix-ui/themes';
import { Hero } from '../../../website/src/components/Hero';
import { Plugs } from '../../../website/src/components/Plugs';
import { ToolCard } from '../../../website/src/components/ToolCard';
import {
compareTool,
@@ -14,7 +13,6 @@ import {
} from '../../../website/src/constants/tools';
import { AdMidSectionResponsive } from '../components/AdMidSectionResponsive';
import { useAdExempt } from '../hooks/useAdExempt';
import { Plugs } from '../../../website/src/components/Plugs';
export default function Page() {
const exempt = useAdExempt();
@@ -1,5 +1,3 @@
'use client';
import { Flex, Heading, Switch, Text } from '@radix-ui/themes';
import { PageWrapper } from '../../components/PageWrapper';
import * as App from '../../stores/app';
@@ -1,5 +1,5 @@
import { Heading, Table } from '@radix-ui/themes';
import { times } from 'lodash';
import { times } from 'lodash-es';
import { StickyColumnHeaderCell } from '../../../../components/StickyColumnHeaderCell';
import * as CompareEphemeral from '../../../../stores/compareEphemeral';
@@ -10,7 +10,7 @@ import {
} from '@blitzkit/core';
import { ComponentPlaceholderIcon } from '@radix-ui/react-icons';
import { Button, Flex, Popover, Slider, Table, Text } from '@radix-ui/themes';
import { debounce, times } from 'lodash';
import { debounce, times } from 'lodash-es';
import { use } from 'react';
import { BlitzkitButtonGrayIcon } from '../../../../components/BlitzkitButtonGrayIcon';
import { ConsumablesManager } from '../../../../components/ConsumablesManager';
@@ -1,5 +1,3 @@
'use client';
import {
createDefaultSkills,
equipmentDefinitions,
@@ -1,13 +1,11 @@
'use client';
import { Code, Heading } from '@radix-ui/themes';
import { useSearchParams } from 'next/navigation';
import { useMemo } from 'react';
import { PageWrapper } from '../../../../../components/PageWrapper';
import {
configurations,
extractEmbedConfigDefaults,
} from '../../../../../../../website/src/constants/embeds';
import { PageWrapper } from '../../../../../components/PageWrapper';
import * as EmbedState from '../../../../../stores/embedState';
export interface EmbedPreviewControllerProps {
@@ -1,5 +1,3 @@
'use client';
import { imgur } from '@blitzkit/core';
import {
CodeIcon,
@@ -11,12 +9,12 @@ import {
WidthIcon,
} from '@radix-ui/react-icons';
import { Box, Button, Flex, Heading, ScrollArea, Text } from '@radix-ui/themes';
import { capitalize, startCase } from 'lodash';
import { capitalize, startCase } from 'lodash-es';
import { ReactNode, useEffect, useRef, useState } from 'react';
import { stringify } from 'urlon';
import { configurations } from '../../../../../../website/src/constants/embeds';
import { CopyButton } from '../../../../components/CopyButton';
import { PageWrapper } from '../../../../components/PageWrapper';
import { configurations } from '../../../../../../website/src/constants/embeds';
import * as App from '../../../../stores/app';
import * as EmbedState from '../../../../stores/embedState';
import { EmbedConfig } from '../../../../stores/embedState';
@@ -1,5 +1,3 @@
'use client';
import { imgur, ImgurSize } from '@blitzkit/core';
import Link from 'next/link';
import { usePathname } from 'next/navigation';
@@ -1,5 +1,5 @@
import { Table } from '@radix-ui/themes';
import { times } from 'lodash';
import { times } from 'lodash-es';
import { RowLoader } from './RowLoader';
export function BodyLoader() {
@@ -1,5 +1,3 @@
'use client';
import {
CaretDownIcon,
CaretSortIcon,
@@ -1,6 +1,8 @@
'use client';
import { averageDefinitions, discoveredIdsDefinitions, formatCompact } from '@blitzkit/core';
import {
averageDefinitions,
discoveredIdsDefinitions,
formatCompact,
} from '@blitzkit/core';
import { InfoCircledIcon } from '@radix-ui/react-icons';
import { Callout, Flex } from '@radix-ui/themes';
import { use } from 'react';
@@ -1,5 +1,3 @@
'use client';
import { Flex, Select, Text } from '@radix-ui/themes';
import * as TankPerformancePersistent from '../../../../stores/tankPerformancePersistent';
import { PlayerCountPeriod } from '../../../../stores/tankPerformancePersistent/constants';
@@ -1,5 +1,5 @@
import { Skeleton, Table } from '@radix-ui/themes';
import { times } from 'lodash';
import { times } from 'lodash-es';
import { memo, useRef } from 'react';
import { useIntersection } from '../../../../hooks/useIntersection';
import { TankPerformanceSortTypeNamesArray } from '../../../../stores/tankPerformanceSort/constants';
@@ -1,5 +1,3 @@
'use client';
import { Flex } from '@radix-ui/themes';
import { Suspense } from 'react';
import { StickyTableRoot } from '../../../../components/StickyTableRoot';
@@ -1,19 +1,14 @@
'use client';
import {
averageDefinitionsArray,
tankDefinitions,
} from '@blitzkit/core';
import { averageDefinitionsArray, tankDefinitions } from '@blitzkit/core';
import { Table } from '@radix-ui/themes';
import { times } from 'lodash';
import { times } from 'lodash-es';
import { Suspense, use, useEffect, useMemo, useState } from 'react';
import { filterTank } from '../../../../core/blitzkit/filterTank';
import * as TankFilters from '../../../../stores/tankFilters';
import * as TankPerformancePersistent from '../../../../stores/tankPerformancePersistent';
import * as TankPerformanceSort from '../../../../stores/tankPerformanceSort';
import { RowLoader } from './RowLoader';
import { TankRow } from './TankRow';
import { Total } from './Total';
import { filterTank } from '../../../../core/blitzkit/filterTank';
const PREVIEW_COUNT = 10;
const DEFAULT_LOADED_ROWS = 25;
@@ -1,5 +1,3 @@
'use client';
import {
averageDefinitionsArray,
formatCompact,
@@ -12,7 +10,7 @@ import {
import strings from '@blitzkit/core/lang/en-US.json';
import { ResponsiveBar } from '@nivo/bar';
import { Box, Flex, Heading } from '@radix-ui/themes';
import { times } from 'lodash';
import { times } from 'lodash-es';
import { use } from 'react';
import { nivoTheme } from '../../../../core/nivo/theme';
@@ -4,7 +4,7 @@ import {
SymbolIcon,
} from '@radix-ui/react-icons';
import { Flex, IconButton, TextField } from '@radix-ui/themes';
import { range } from 'lodash';
import { range } from 'lodash-es';
import { useEffect, useRef } from 'react';
import { infiniteSpin } from './index.css';
@@ -1,5 +1,3 @@
'use client';
import {
AccountList,
AccountListItem,
@@ -33,7 +31,7 @@ import {
TextField,
} from '@radix-ui/themes';
import { produce } from 'immer';
import { debounce, range } from 'lodash';
import { debounce, range } from 'lodash-es';
import { ChangeEvent, useEffect, useRef, useState } from 'react';
import { create } from 'zustand';
import { PageWrapper } from '../../../components/PageWrapper';
@@ -1,5 +1,3 @@
'use client';
import {
AccountListWithServer,
IndividualAccountInfo,
@@ -37,7 +35,7 @@ import {
Text,
TextField,
} from '@radix-ui/themes';
import { debounce } from 'lodash';
import { debounce } from 'lodash-es';
import { use, useEffect, useMemo, useRef, useState } from 'react';
import { PageWrapper } from '../../../components/PageWrapper';
import { TankRowHeaderCell } from '../../../components/TankRowHeaderCell';
@@ -1,6 +1,6 @@
import { asset } from '@blitzkit/core';
import { Flex, Heading, Slider, TextField } from '@radix-ui/themes';
import { clamp, debounce } from 'lodash';
import { clamp, debounce } from 'lodash-es';
import { useEffect, useMemo, useRef, useState } from 'react';
import { GenericTankComponentButton } from '../../../../../../../components/ModuleButtons/GenericTankComponentButton';
import * as Duel from '../../../../../../../stores/duel';
@@ -61,10 +61,10 @@ export function Miscellaneous() {
cooldownBooster === 0
? undefined
: cooldownBooster === 1
? '#afb0abc0'
: cooldownBooster === 2
? '#5f72cbc0'
: '#9b3cc0c0'
? '#afb0abc0'
: cooldownBooster === 2
? '#5f72cbc0'
: '#9b3cc0c0'
}
iconStyles={{
transform: 'translate(-50%, -50%) scale(0.8)',
@@ -19,7 +19,7 @@ import {
TextField,
Tooltip,
} from '@radix-ui/themes';
import { debounce } from 'lodash';
import { debounce } from 'lodash-es';
import { Fragment, use, useEffect, useRef, useState } from 'react';
import { lerp } from 'three/src/math/MathUtils';
import { Ad, AdType } from '../../../../../../components/Ad';
@@ -1,5 +1,3 @@
'use client';
import { TIER_ROMAN_NUMERALS } from '@blitzkit/core';
import strings from '@blitzkit/core/lang/en-US.json';
import { invalidate } from '@react-three/fiber';
@@ -1,6 +1,6 @@
import { StarsInt } from '@blitzkit/core';
import { Flex, Text, TextProps } from '@radix-ui/themes';
import { times } from 'lodash';
import { times } from 'lodash-es';
import { PartialStar } from './components/PartialStar';
type StarsProps = TextProps & {
@@ -1,5 +1,3 @@
'use client';
import { formatCompact } from '@blitzkit/core';
import { Flex, Heading, Skeleton, Text } from '@radix-ui/themes';
import { memo } from 'react';
@@ -51,8 +51,7 @@ export function MetaSection() {
</Button>
</Link>
{assertSecret(process.env.NEXT_PUBLIC_PROMOTE_OPENTEST) ===
'true' && (
{assertSecret(process.env.PUBLIC_PROMOTE_OPENTEST) === 'true' && (
<Link
href={`https://opentest.blitzkit.app/tools/tankopedia/${protagonist.id}`}
>
@@ -134,8 +133,8 @@ export function MetaSection() {
protagonist.treeType === 'collector'
? 'blue'
: protagonist.treeType === 'premium'
? 'amber'
: undefined
? 'amber'
: undefined
}
>
{strings.common.tree_type[protagonist.treeType]}
@@ -1,5 +1,5 @@
import { useFrame, useLoader } from '@react-three/fiber';
import { clamp } from 'lodash';
import { clamp } from 'lodash-es';
import { useRef } from 'react';
import { MeshStandardMaterial, TextureLoader } from 'three';
import * as TankopediaPersistent from '../../../../../stores/tankopediaPersistent';
@@ -1,5 +1,3 @@
'use client';
import { TIER_ROMAN_NUMERALS } from '@blitzkit/core';
import strings from '@blitzkit/core/lang/en-US.json';
import { invalidate } from '@react-three/fiber';
@@ -1,5 +1,3 @@
'use client';
import {
asset,
gameDefinitions,
@@ -10,7 +8,7 @@ import {
import strings from '@blitzkit/core/lang/en-US.json';
import { ReloadIcon } from '@radix-ui/react-icons';
import { Box, Flex, IconButton, Text, Tooltip } from '@radix-ui/themes';
import { times } from 'lodash';
import { times } from 'lodash-es';
import { use } from 'react';
import { classIcons } from '../../../../components/ClassIcon';
import { ExperimentIcon } from '../../../../components/ExperimentIcon';
@@ -1,4 +1,4 @@
import { TankDefinition } from '@blitzkit/core';
import { type TankDefinition } from '@blitzkit/core';
import { CaretRightIcon } from '@radix-ui/react-icons';
import { Button, Link, TextField } from '@radix-ui/themes';
import * as TankFilters from '../../../../stores/tankFilters';
@@ -1,7 +1,7 @@
import { TankDefinition } from '@blitzkit/core';
import { MagnifyingGlassIcon } from '@radix-ui/react-icons';
import { Flex, Spinner, TextField } from '@radix-ui/themes';
import { debounce } from 'lodash';
import { debounce } from 'lodash-es';
import { useRouter } from 'next/navigation';
import { KeyboardEventHandler, useCallback, useRef } from 'react';
import * as TankFilters from '../../../../stores/tankFilters';
@@ -1,5 +1,3 @@
'use client';
import {
TANK_CLASSES,
TankDefinition,
@@ -15,7 +13,7 @@ import {
} from '@blitzkit/core';
import { Callout, Flex, FlexProps, Link, Text } from '@radix-ui/themes';
import { go } from 'fuzzysort';
import { times } from 'lodash';
import { times } from 'lodash-es';
import { Fragment, memo, use, useEffect, useMemo, useState } from 'react';
import { AdMidSectionResponsive } from '../../../../../components/AdMidSectionResponsive';
import { ExperimentIcon } from '../../../../../components/ExperimentIcon';
@@ -1,6 +1,6 @@
import { Tier, TIER_ROMAN_NUMERALS } from '@blitzkit/core';
import { Flex, IconButton, Text } from '@radix-ui/themes';
import { times } from 'lodash';
import { times } from 'lodash-es';
import { memo } from 'react';
import * as TankFilters from '../../../../stores/tankFilters';
import * as TankopediaSort from '../../../../stores/tankopediaSort';