(trashIds, n = 3)
| 923 | // ─── Rendering helpers ─── |
| 924 | |
| 925 | function getRecentTracks(trashIds, n = 3) { |
| 926 | return Object.entries(tracks) |
| 927 | .filter(([id, t]) => !trashIds.has(id) && t.title) |
| 928 | .sort(([, a], [, b]) => (b.createdAt ?? 0) - (a.createdAt ?? 0)) |
| 929 | .slice(0, n) |
| 930 | .map(([id]) => id); |
| 931 | } |
| 932 | |
| 933 | function getAllTags(trashIds) { |
| 934 | const counts = {}; |