FIX: fix bug undefind monster image
All checks were successful
Gitea Auto Deploy / Deploy-Container (push) Successful in 1m13s

This commit is contained in:
2025-08-21 10:13:04 +07:00
parent 036719049a
commit f6abcc9024
4 changed files with 11 additions and 7 deletions

View File

@@ -8,6 +8,7 @@ const nextConfig: NextConfig = {
reactStrictMode: false,
output: 'standalone',
images: {
unoptimized: true,
remotePatterns: [
{
protocol: 'https',

Binary file not shown.

Before

Width:  |  Height:  |  Size: 244 KiB

After

Width:  |  Height:  |  Size: 252 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 MiB

After

Width:  |  Height:  |  Size: 1.2 MiB

View File

@@ -21,6 +21,7 @@ export default function EnemyBar() {
<div key={uid} className="bg-base-200 rounded-lg p-3 border border-gray-700 w-52 flex-shrink-0">
<div className="flex items-center justify-between mb-3">
<div className="flex items-center gap-2">
{listEnemy.find((monster) => monster.child.includes(enemy.id))?.icon?.split("/")?.pop()?.replace(".png", "") && (
<Image
src={`https://api.hakush.in/hsr/UI/monstermiddleicon/${listEnemy.find((monster) => monster.child.includes(enemy.id))?.icon?.split("/")?.pop()?.replace(".png", "")}.webp`}
alt={enemy.name}
@@ -28,6 +29,8 @@ export default function EnemyBar() {
height={40}
className="object-cover w-10 h-10 rounded-lg"
/>
)}
<div className="flex-1 min-w-0">
<NameAvatar
text={getNameEnemy(locale, listEnemy.find((monster) => monster.child.includes(enemy.id)))}