feat: add 400_url for operator details

This commit is contained in:
jinhojang6 2024-12-16 20:49:07 +09:00
parent 22107a335a
commit 74ab5bf9c9
3 changed files with 8 additions and 2 deletions

View File

@ -77,8 +77,8 @@ const OperatorDetails: React.FC<OperatorDetailsProps> = ({
<Container>
<OperatorImage>
<img
src={isDegenMode ? operator?.pixelated : operator?.image}
data-src={isDegenMode ? operator?.pixelated : operator?.gif}
src={isDegenMode ? operator?.pixelated : operator?.image_400}
data-src={isDegenMode ? operator?.pixelated : operator?.gif_400}
alt={`Operator ${id}`}
loading="lazy"
className="lazyload"

View File

@ -16,6 +16,8 @@ export interface Operator {
archetype: string
image_200_url: string
image_200_jpeg_url: string
image_400_url?: string
image_400_jpeg_url?: string
image_pixalated_url: string
comp: string
background: string
@ -33,9 +35,11 @@ export interface Group {
export interface ProcessedOperator {
id: string
image: string
image_400?: string
name: string
archetype: string
gif: string
gif_400?: string
comp: string
background: string
skin: string

View File

@ -17,7 +17,9 @@ export function processOperators(
return group.operators.map((operator) => ({
id: operator.id.toString(),
image: operator.image_200_jpeg_url,
image_400: operator.image_400_url,
gif: operator.image_200_url,
gif_400: operator.image_400_url,
pixelated: operator.image_pixalated_url,
name: operator.archetype__name,
comp: operator.comp,