diff --git a/src/components/showcaseCard/index.tsx b/src/components/showcaseCard/index.tsx index c6186d5..1e1e690 100644 --- a/src/components/showcaseCard/index.tsx +++ b/src/components/showcaseCard/index.tsx @@ -460,7 +460,14 @@ export default function ShowCaseInfo() { mapRelicInfo, avatarSkillTree ]) - + const applyBrightness = useCallback((hex: string, brightness: number): string => { + const r = Math.round(parseInt(hex.slice(1, 3), 16) * brightness); + const g = Math.round(parseInt(hex.slice(3, 5), 16) * brightness); + const b = Math.round(parseInt(hex.slice(5, 7), 16) * brightness); + + return `#${r.toString(16).padStart(2, "0")}${g.toString(16).padStart(2, "0")}${b.toString(16).padStart(2, "0")}`; + }, []) + const getImageSkill = useCallback((icon: string | undefined, status: StatusAddType | undefined) => { if (!icon) return if (icon.startsWith("SkillIcon")) { @@ -484,17 +491,15 @@ export default function ShowCaseInfo() {
-
- -
+
@@ -523,42 +528,37 @@ export default function ShowCaseInfo() {
-
-
+ +
{avatarSelected && avatarInfo && avatarData?.data && typeof avatarData?.data?.rank === "number" && (
{avatarInfo?.RankIcon.map((src, index) => { const isActive = avatarData?.data?.rank > index; return ( -
- {isActive && ( -
-
- -
-
- )} +
); @@ -568,7 +568,7 @@ export default function ShowCaseInfo() {
-
+