From 4245c9bfde8decd37db3b091873eb1a33a419a1d Mon Sep 17 00:00:00 2001 From: AzenKain Date: Sat, 27 Sep 2025 10:03:58 +0700 Subject: [PATCH] UPDATE: More optimaze --- src/app/layout.tsx | 4 +- src/components/card/characterCard.tsx | 18 +- src/components/card/showCaseCard.tsx | 665 -------------------------- 3 files changed, 12 insertions(+), 675 deletions(-) delete mode 100644 src/components/card/showCaseCard.tsx diff --git a/src/app/layout.tsx b/src/app/layout.tsx index e23db79..0bd14f3 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -36,8 +36,8 @@ export const metadata: Metadata = { images: [ { url: "https://sranalysis.kain.id.vn/ff-sranalysis.png", - width: 630, - height: 630, + width: 312, + height: 312, alt: "Firefly Analytics Logo", }, ], diff --git a/src/components/card/characterCard.tsx b/src/components/card/characterCard.tsx index 512cff1..018c983 100644 --- a/src/components/card/characterCard.tsx +++ b/src/components/card/characterCard.tsx @@ -5,8 +5,7 @@ import useLocaleStore from '@/stores/localeStore'; import { AvatarHakushiType } from '@/types'; import NameAvatar from '../nameAvatar'; import useBattleDataStore from '@/stores/battleDataStore'; -import { useEffect, useMemo, useState } from 'react'; -import { AvatarInfo } from '@/types/mics'; +import Image from 'next/image'; interface CharacterCardProps { data: AvatarHakushiType @@ -29,20 +28,23 @@ export default function CharacterCard({ data }: CharacterCardProps) { >
- ALT - {data.damageType.toLowerCase()} - {data.baseType.toLowerCase()}('https://api.hakush.in/hsr/UI/avatardrawcard/1001.webp'); - const [position, setPosition] = useState<{ x: number; y: number }>({ x: 0, y: 100 }); - const ref = useRef(null) - - return ( -
- -
-
- Showcase Background -
- -
-
-
-
-
- Character Preview -
-
-
-
- {[ - "https://worker-sparkling-dawn-a1c1.srv2.workers.dev/hsr.honeyhunterworld.com/img/eidolon/memory-of-you-eidolon_icon_small.webp", - "https://worker-sparkling-dawn-a1c1.srv2.workers.dev/hsr.honeyhunterworld.com/img/eidolon/memory-of-it-eidolon_icon_small.webp", - "https://worker-sparkling-dawn-a1c1.srv2.workers.dev/hsr.honeyhunterworld.com/img/eidolon/memory-of-everything-eidolon_icon_small.webp", - "https://worker-sparkling-dawn-a1c1.srv2.workers.dev/hsr.honeyhunterworld.com/img/eidolon/never-forfeit-again-eidolon_icon_small.webp", - "https://worker-sparkling-dawn-a1c1.srv2.workers.dev/hsr.honeyhunterworld.com/img/eidolon/never-forget-again-eidolon_icon_small.webp", - "https://worker-sparkling-dawn-a1c1.srv2.workers.dev/hsr.honeyhunterworld.com/img/eidolon/just-like-this-always-eidolon_icon_small.webp" - ].map((src, index) => ( -
- Rank Icon -
- -
-
- ))} -
-
-
-
- Background - -
-
-
-
- March 7th - Element Icon -
-
- Path Icon - Preservation -
-
- Lv. 80 - / - 80 -
-
-
-
- Path Icon -
-
-
-
- Skill Icon - 6 / 6 - Basic ATK -
-
-
-
- Skill Icon - 10 / 10 - Skill -
-
-
-
-
- Skill Icon - 10 / 10 - Ultimate -
-
-
-
-
- Skill Icon - 8 / 8 - Talent -
-
-
-
- Skill Icon - 5 / 5 - Technique -
-
-
-
- -
-
- {/* First Column */} -
- Icon 1001101 -
- Icon 1001101 - Icon 1001101 -
-
- - {/* Second Column */} -
- Icon 1001102 -
- Icon 1001102 - Icon 1001102 -
-
- - {/* Third Column */} -
- Icon 1001103 -
- Icon 1001103 - Icon 1001103 - Icon 1001103 -
-
- - {/* Fourth Column */} -
-
- Icon 1001201 - Icon 1001201 - Icon 1001201 -
-
-
-
- -
-
- Light Cone Preview - Light Cone Rarity Icon -
-
- On the Fall of an Aeon -
-
- V -
-
- Lv. 80 - / - 80 -
-
-
-
- Attribute Icon - 529 -
-
- Attribute Icon - 397 -
-
- Attribute Icon - 1058 -
-
-
-
- -
-
- -
-
-
-
- Stat Icon - HP -
-
-
2942
-
- -
-
- Stat Icon - ATK -
-
-
3212
-
- -
-
- Stat Icon - DEF -
-
-
1255
-
- -
-
- Stat Icon - SPD -
-
-
106
-
- -
-
- Stat Icon - CRIT Rate -
-
-
16.7%
-
- -
-
- Stat Icon - CRIT DMG -
-
-
79.2%
-
- -
-
- Stat Icon - Break Effect -
-
-
186.9%
-
- -
-
- Stat Icon - Effect RES -
-
-
4.0%
-
- -
-
- Stat Icon - Energy Regeneration Rate -
-
-
0.0%
-
- -
-
- Stat Icon - Effect Hit Rate -
-
-
20.3%
-
- -
-
- Stat Icon - Outgoing Healing Boost -
-
-
0.0%
-
- -
-
- Stat Icon - Ice DMG Boost -
-
-
6.4%
-
-
- -
- -
-
- Prisoner in Deep Confinement -
- 2 -
-
-
- Watchmaker, Master of Dream Machinations -
- 2 -
-
-
- Talia: Kingdom of Banditry -
- 2 -
-
-
-
-
-
-
-
- Relic Icon - Relic Rarity Icon -
-
- Main Affix Icon - 705 - +15 -
-
-
-
-
- Sub Affix Icon - +7.8% -
-
-
-
- Sub Affix Icon - +3.2% -
-
-
-
- Sub Affix Icon - +17.5% -
-
-
-
- Sub Affix Icon - +15.6% -
-
-
-
- -
-
- Relic Icon - Relic Rarity Icon -
-
- Main Affix Icon - 352 - +15 -
-
-
-
-
- Sub Affix Icon - +6.9% -
-
-
-
- Sub Affix Icon - +11.7% -
-
-
-
- Sub Affix Icon - +3.9% -
-
-
-
- Sub Affix Icon - +23.3% -
-
-
-
- -
-
- Relic Icon - Relic Rarity Icon -
-
- Main Affix Icon - 43.2% - +15 -
-
-
-
-
- Sub Affix Icon - +57 -
-
-
-
- Sub Affix Icon - +3.9% -
-
-
-
- Sub Affix Icon - +2.6% -
-
-
-
- Sub Affix Icon - +19.4% -
-
-
-
- -
-
- Relic Icon - Relic Rarity Icon -
-
- Main Affix Icon - 18.9% - +15 -
-
-
-
-
- Sub Affix Icon - +5.2% -
-
-
-
- Sub Affix Icon - +4.3% -
-
-
-
- Sub Affix Icon - +2.7% -
-
-
-
- Sub Affix Icon - +34 -
-
-
-
-
-
- Relic Icon - Relic Rarity Icon -
-
- Main Affix Icon - 18.9% - +15 -
-
-
-
-
- Sub Affix Icon - +5.2% -
-
-
-
- Sub Affix Icon - +4.3% -
-
-
-
- Sub Affix Icon - +2.7% -
-
-
-
- Sub Affix Icon - +34 -
-
-
-
-
-
- Relic Icon - Relic Rarity Icon -
-
- Main Affix Icon - 18.9% - +15 -
-
-
-
-
- Sub Affix Icon - +5.2% -
-
-
-
- Sub Affix Icon - +4.3% -
-
-
-
- Sub Affix Icon - +2.7% -
-
-
-
- Sub Affix Icon - +34 -
-
-
-
-
-
- -
-
- -
-
- -
- ); -}