From f40a403ea2f6416796afbe4c1b1f143ecbba4263 Mon Sep 17 00:00:00 2001 From: AzenKain Date: Thu, 14 Aug 2025 21:41:21 +0700 Subject: [PATCH] fix bug --- src/components/showcaseCard/index.tsx | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/src/components/showcaseCard/index.tsx b/src/components/showcaseCard/index.tsx index 7ad16a7..fc51730 100644 --- a/src/components/showcaseCard/index.tsx +++ b/src/components/showcaseCard/index.tsx @@ -144,16 +144,16 @@ export default function ShowCaseInfo() { return { img: `https://api.hakush.in/hsr/UI/relicfigures/IconRelic_${value.relic_set_id}_${key}.webp`, mainAffix: { - property: mainAffixMap?.[value.main_affix_id]?.property, - level: value.level, - valueAffix: calcMainAffixBonus(mainAffixMap?.[value.main_affix_id], value.level), - detail: mappingStats[mainAffixMap?.[value.main_affix_id].property] + property: mainAffixMap?.[value?.main_affix_id]?.property, + level: value?.level, + valueAffix: calcMainAffixBonus(mainAffixMap?.[value?.main_affix_id], value?.level), + detail: mappingStats?.[mainAffixMap?.[value?.main_affix_id]?.property] }, - subAffix: value?.sub_affixes.map((subValue) => { + subAffix: value?.sub_affixes?.map((subValue) => { return { - property: subAffixMap?.[subValue.sub_affix_id]?.property, - valueAffix: calcAffixBonus(subAffixMap?.[subValue.sub_affix_id], subValue.step, subValue.count), - detail: mappingStats[subAffixMap?.[subValue.sub_affix_id].property] + property: subAffixMap?.[subValue?.sub_affix_id]?.property, + valueAffix: calcAffixBonus(subAffixMap?.[subValue?.sub_affix_id], subValue?.step, subValue?.count), + detail: mappingStats?.[subAffixMap?.[subValue?.sub_affix_id]?.property] } }) } @@ -899,7 +899,13 @@ export default function ShowCaseInfo() { return (
- + {subAffix?.detail?.icon ? ( + + ) : ( +
+ ? +
+ )} +{subAffix?.valueAffix + subAffix?.detail?.unit}