Add external link button to product list items

Opens the product's URL in a new tab directly from the dashboard,
without needing to go to the product detail page first.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
clucraft 2026-01-21 13:28:10 -05:00
parent 040cdb9c42
commit 2acc47c21c

View file

@ -350,6 +350,19 @@ export default function ProductCard({ product, onDelete, onRefresh }: ProductCar
</div>
<div className="product-actions">
<a
href={product.url}
target="_blank"
rel="noopener noreferrer"
className="btn btn-secondary btn-icon"
title="Open product page"
>
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
<path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" />
<polyline points="15 3 21 3 21 9" />
<line x1="10" y1="14" x2="21" y2="3" />
</svg>
</a>
<button
className={`btn btn-secondary btn-icon ${isRefreshing ? 'refreshing' : ''}`}
onClick={handleRefresh}