mirror of
https://github.com/christianvidalwolf-prog/CrazeAnalytix.git
synced 2026-08-03 13:15:24 +02:00
Fix: remove duplicated Top50 ranking badges, keep only leftmost instance
This commit is contained in:
@@ -1374,7 +1374,7 @@ const DataGrid: React.FC<DataGridProps> = ({ data, filters, hasCustomerFilter, a
|
||||
<tbody className="divide-y divide-border text-slate-300">
|
||||
{paginatedRows.map((row) => (
|
||||
<tr key={row.id} className="hover:bg-slate-800/50 transition-colors group relative hover:z-50">
|
||||
{effectiveDimensions.map(dim => (
|
||||
{effectiveDimensions.map((dim, dimIdx) => (
|
||||
<td key={dim} className="px-2.5 py-3 font-medium text-slate-200 break-words max-w-xs">
|
||||
{dim === 'title'
|
||||
? <div className="flex items-start gap-2 max-w-sm relative group/title">
|
||||
@@ -1387,7 +1387,7 @@ const DataGrid: React.FC<DataGridProps> = ({ data, filters, hasCustomerFilter, a
|
||||
{stockMap && (
|
||||
<StockBadge stock={stockMap.get(row.sku?.replace(/(DE|EN)$/i, ''))} />
|
||||
)}
|
||||
{(() => {
|
||||
{dimIdx === 0 && (() => {
|
||||
const asin = (row.asin || '').trim().toUpperCase();
|
||||
if (asin && top50Ranking) {
|
||||
if (top50Mode === 'eu') {
|
||||
@@ -1411,7 +1411,7 @@ const DataGrid: React.FC<DataGridProps> = ({ data, filters, hasCustomerFilter, a
|
||||
</div>
|
||||
: dim === 'asin' || dim === 'sku'
|
||||
? <div className="flex items-center gap-2 min-w-max">
|
||||
{(() => {
|
||||
{dimIdx === 0 && (() => {
|
||||
const asin = (row.asin || '').trim().toUpperCase();
|
||||
if (asin && top50Ranking) {
|
||||
if (top50Mode === 'eu') {
|
||||
|
||||
Reference in New Issue
Block a user