feat : fix bug
This commit is contained in:
@@ -56,7 +56,8 @@ export async function GET(
|
||||
anuphanFonts,
|
||||
Promise.all(guide.weapons.map((row) => pngDataUrl(row.weapon.imageUrl))),
|
||||
]);
|
||||
const height = Math.max(360, 190 + guide.weapons.length * 126 + Math.max(0, guide.weapons.length - 1) * 14);
|
||||
const weaponHeights = guide.weapons.map((row) => Math.max(126, 126 + (row.note ? Math.ceil(row.note.length / 52) * 22 : 0)));
|
||||
const height = Math.max(360, 190 + weaponHeights.reduce((sum, rowHeight) => sum + rowHeight, 0) + Math.max(0, guide.weapons.length - 1) * 14);
|
||||
|
||||
return new ImageResponse(
|
||||
<div
|
||||
@@ -81,7 +82,7 @@ export async function GET(
|
||||
key={row.id}
|
||||
style={{
|
||||
display: "flex",
|
||||
minHeight: 112,
|
||||
minHeight: weaponHeights[index],
|
||||
overflow: "hidden",
|
||||
borderRadius: 14,
|
||||
background: "white",
|
||||
@@ -104,8 +105,11 @@ export async function GET(
|
||||
) : (
|
||||
<div style={{ display: "flex", width: 92, height: 92, alignItems: "center", justifyContent: "center", fontSize: 32 }}>{index + 1}</div>
|
||||
)}
|
||||
<div style={{ display: "flex", fontSize: 24, fontWeight: 700 }}>
|
||||
{index + 1}. {row.weapon.name} R{row.refinement}
|
||||
<div style={{ display: "flex", flexDirection: "column", gap: 5 }}>
|
||||
<div style={{ display: "flex", fontSize: 24, fontWeight: 700 }}>
|
||||
{index + 1}. {row.weapon.name} R{row.refinement}
|
||||
</div>
|
||||
{row.note ? <div style={{ display: "flex", fontSize: 14, lineHeight: 1.55 }}>{row.note}</div> : null}
|
||||
</div>
|
||||
</div>
|
||||
<div style={{ display: "flex", flex: 1, alignItems: "center", justifyContent: "space-around", gap: 12, color: "#17171c", padding: "12px 16px" }}>
|
||||
|
||||
Reference in New Issue
Block a user