Desktop: app hero without screenshots no longer shows a cropped second copy of the icon

This commit is contained in:
CRTkafa 2026-10-23 08:39:51 +08:00
parent 618ff9e488
commit 707db2ebc6
2 changed files with 4 additions and 6 deletions

View file

@ -205,9 +205,10 @@ export function Hero({ name, icon, projectId, ids, badges, links, all, ios, andr
</div>
{children}
</div>
<div className={`ds-hero-shots${shots.length ? '' : ' empty'}`} aria-hidden="true">
{shots.length ? shots.map((s, i) => <img key={i} src={s} alt="" draggable={false} />) : <AppIcon name={name} src={icon} className="pf-hero-icon" />}
</div>
{/* no screenshots: no second (cropped) copy of the icon, which already leads the hero */}
{shots.length > 0 && <div className="ds-hero-shots" aria-hidden="true">
{shots.map((s, i) => <img key={i} src={s} alt="" draggable={false} />)}
</div>}
</section>
);
}