feat(web): complete ticker-table refactor for listings page (TEC-3046)

- Thay mockDelta bằng getDelta30d: hiển thị "—" khi API chưa có priceDelta30d
- Cải thiện row hover/active bằng design tokens (active:bg-accent/10, duration-100)
- Viết 16 Vitest tests: render, sort, toggle view, filter bar, navigation

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
Ho Ngoc Hai
2026-04-21 02:01:55 +07:00
parent d6d7584677
commit d91e3f6fe2
3 changed files with 385 additions and 10 deletions

View File

@@ -182,10 +182,15 @@ export function DataTable<T>({
key={key}
onClick={onRowClick ? () => onRowClick(row) : undefined}
className={cn(
'border-b border-border/60 transition-colors',
'border-b border-border/60 transition-colors duration-100',
dense ? 'h-row' : 'h-10',
index % 2 === 1 && 'bg-background-surface/40',
onRowClick && 'cursor-pointer hover:bg-background-surface',
onRowClick && [
'cursor-pointer',
'hover:bg-background-surface',
'active:bg-accent/10',
'focus-within:bg-background-surface',
],
)}
>
{columns.map((col) => (