Use real assets.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { useLayoutEffect, useRef, useState } from 'react'
|
||||
import { createPortal } from 'react-dom'
|
||||
import type { Card } from '../types'
|
||||
import { artFor } from '../petArt'
|
||||
import { artFor, artUrlFor } from '../petArt'
|
||||
|
||||
// The suit's "hat" — the trade-in symbol printed on the real cards, tinted to
|
||||
// the suit's colour. Drawn as a tiny sun-hat SVG so it scales crisply.
|
||||
@@ -272,7 +272,11 @@ export function CardView({
|
||||
)}
|
||||
{damage > 0 && !dead && <span className="card-damage">−{damage}</span>}
|
||||
<div className="card-art" aria-hidden>
|
||||
{artFor(card.name)}
|
||||
{artUrlFor(card.name) ? (
|
||||
<img className="card-art-img" src={artUrlFor(card.name)!} alt="" draggable={false} />
|
||||
) : (
|
||||
artFor(card.name)
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
{/* Lower panel: the suit hat, name, and tier die on one row, the ability
|
||||
|
||||
Reference in New Issue
Block a user