mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-14 13:16:11 +01:00
imports
This commit is contained in:
1 parent
1a7a1223d5
commit
33ebbbeb65
39 files changed
+153
-208
No files matched your search
@@ -1,8 +1,8 @@
|
||||
import { asset, formatCompact, TIER_ROMAN_NUMERALS } from "@blitzkit/core";
|
||||
import { formatCompact, TIER_ROMAN_NUMERALS } from "@blitzkit/core";
|
||||
import { literals } from "@blitzkit/i18n/src/literals";
|
||||
import { Box, Flex, Skeleton, Text } from "@radix-ui/themes";
|
||||
import { awaitableAverageDefinitions } from "../../../../core/awaitables/averageDefinitions";
|
||||
import { awaitableTankDefinitions } from "../../../../core/awaitables/tankDefinitions";
|
||||
import { api } from "../../../../core/blitzkit/api";
|
||||
import { useLocale } from "../../../../hooks/useLocale";
|
||||
import { Tankopedia } from "../../../../stores/tankopedia";
|
||||
import type { MaybeSkeletonComponentProps } from "../../../../types/maybeSkeletonComponentProps";
|
||||
@@ -15,7 +15,7 @@ type NodeProps = MaybeSkeletonComponentProps & {
|
||||
};
|
||||
|
||||
const [tankDefinitions, averageDefinitions] = await Promise.all([
|
||||
awaitableTankDefinitions,
|
||||
api.tankDefinitions(),
|
||||
awaitableAverageDefinitions,
|
||||
]);
|
||||
|
||||
@@ -58,7 +58,7 @@ export function Node({ id, highlight, nextIds, skeleton }: NodeProps) {
|
||||
mx={highlight ? "2" : "0"}
|
||||
style={{
|
||||
background: highlight
|
||||
? `url(${asset(`flags/fade_small/${tank.nation}.webp`)})`
|
||||
? `url(${`/api/flags/fade/${tank.nation}.webp`})`
|
||||
: undefined,
|
||||
backgroundPosition: "center",
|
||||
backgroundSize: "cover",
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { asset, TankType } from "@blitzkit/core";
|
||||
import { TankType } from "@blitzkit/core";
|
||||
import { literals } from "@blitzkit/i18n/src/literals";
|
||||
import { CaretLeftIcon, CaretRightIcon, PlusIcon } from "@radix-ui/react-icons";
|
||||
import { Flex, Heading, IconButton, ScrollArea, Text } from "@radix-ui/themes";
|
||||
import { Fragment, useEffect, useMemo, useRef, useState } from "react";
|
||||
import { awaitableTankDefinitions } from "../../../core/awaitables/tankDefinitions";
|
||||
import { api } from "../../../core/blitzkit/api";
|
||||
import { useLocale } from "../../../hooks/useLocale";
|
||||
import { Duel } from "../../../stores/duel";
|
||||
import { Tankopedia } from "../../../stores/tankopedia";
|
||||
@@ -13,7 +13,7 @@ import { Node } from "./components/Node";
|
||||
|
||||
type Line = number[];
|
||||
|
||||
const tankDefinitions = await awaitableTankDefinitions;
|
||||
const tankDefinitions = await api.tankDefinitions();
|
||||
|
||||
export const XP_MULTIPLIERS = [1, 2, 3, 4, 5, 10];
|
||||
|
||||
@@ -105,7 +105,7 @@ export function TechTreeSection({ skeleton }: MaybeSkeletonComponentProps) {
|
||||
<Flex gap="1" align="center">
|
||||
<img
|
||||
alt="XP"
|
||||
src={asset("icons/currencies/xp.webp")}
|
||||
src={"/api/icons/currencies/xp.webp"}
|
||||
style={{
|
||||
width: "1em",
|
||||
height: "1em",
|
||||
|
||||
Reference in new issue
Block a user