mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 11:39:50 +02:00
dynamically import client api
This commit is contained in:
1 parent
8a3e57637d
commit
b060e65af5
5 files changed
+82
-111
No files matched your search
@@ -1,4 +1,4 @@
|
||||
import { asset, TankType, type TankDefinition } from "@blitzkit/core";
|
||||
import { TankType, type TankDefinition } from "@blitzkit/core";
|
||||
import { Flex, Text, type TextProps } from "@radix-ui/themes";
|
||||
import { uniq } from "lodash-es";
|
||||
import { forwardRef, type ReactNode } from "react";
|
||||
@@ -60,7 +60,7 @@ export const TankCard = forwardRef<HTMLSpanElement, TankCardProps>(
|
||||
className="tank-search-card"
|
||||
data-provide-link={provideLink}
|
||||
style={{
|
||||
backgroundImage: `url(${asset(`flags/scratched/${tank.nation}.webp`)})`,
|
||||
backgroundImage: `url(/api/flags/scratched/${tank.nation}.webp)`,
|
||||
...style,
|
||||
}}
|
||||
{...props}
|
||||
@@ -76,7 +76,7 @@ export const TankCard = forwardRef<HTMLSpanElement, TankCardProps>(
|
||||
>
|
||||
<img
|
||||
alt={unwrap(tank.name!)}
|
||||
src={asset(`icons/tanks/big/${tank.id}.webp`)}
|
||||
src={`/api/tanks/${tank.id}/icons/big.webp`}
|
||||
className="image"
|
||||
draggable={false}
|
||||
/>
|
||||
|
||||
Reference in new issue
Block a user