Commit 64c29cc
Remove download tracking UI from track pages (#14074)
## Summary
This PR removes download count tracking and display functionality from
track pages, including the download stats button and dedicated download
section component.
## Key Changes
- **TrackStats.tsx**: Removed the download count display button that
showed formatted download statistics
- Removed `useTrackDownloadCount` hook and related download count
fetching logic
- Removed `IconCloudDownload` import and download message
- Removed `is_downloadable` field from track data selection
- **GiantTrackTile.tsx**: Removed the download section component from
the track tile
- Removed lazy-loaded `DownloadSection` component
- Removed `useStems` hook and download availability logic
- Removed conditional rendering of the download section
- Removed `Suspense` and `lazy` imports that were only used for the
download section
- **useTrackMetadata.ts**: Updated downloads metadata display logic
- Changed to only show download count when both `isDownloadable` is true
AND `downloadCount > 0`
- Prevents displaying empty download statistics
## Implementation Details
The changes maintain the metadata structure but make the downloads field
conditional on having actual download data, ensuring cleaner UI by not
showing download information when there's nothing to display.
https://claude.ai/code/session_01TFkhjQRGjeoZrtiaXsqC5j
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Dylan Jeffers <dylanjeffers@users.noreply.github.com>1 parent b366981 commit 64c29cc
File tree
3 files changed
+7
-43
lines changed- packages
- common/src/hooks
- web/src/components/track
3 files changed
+7
-43
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
126 | | - | |
| 126 | + | |
| 127 | + | |
127 | 128 | | |
128 | 129 | | |
129 | 130 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | 7 | | |
9 | 8 | | |
10 | 9 | | |
| |||
72 | 71 | | |
73 | 72 | | |
74 | 73 | | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | 74 | | |
82 | 75 | | |
83 | 76 | | |
| |||
219 | 212 | | |
220 | 213 | | |
221 | 214 | | |
222 | | - | |
223 | | - | |
224 | 215 | | |
225 | 216 | | |
226 | 217 | | |
| |||
692 | 683 | | |
693 | 684 | | |
694 | 685 | | |
695 | | - | |
696 | | - | |
697 | | - | |
698 | | - | |
699 | | - | |
700 | | - | |
701 | | - | |
702 | 686 | | |
703 | 687 | | |
704 | 688 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
| 1 | + | |
6 | 2 | | |
7 | 3 | | |
8 | 4 | | |
9 | 5 | | |
10 | | - | |
11 | 6 | | |
12 | 7 | | |
13 | 8 | | |
14 | 9 | | |
15 | 10 | | |
16 | 11 | | |
17 | | - | |
18 | 12 | | |
19 | 13 | | |
20 | 14 | | |
| |||
29 | 23 | | |
30 | 24 | | |
31 | 25 | | |
32 | | - | |
33 | | - | |
| 26 | + | |
34 | 27 | | |
35 | 28 | | |
36 | 29 | | |
| |||
51 | 44 | | |
52 | 45 | | |
53 | 46 | | |
54 | | - | |
55 | | - | |
| 47 | + | |
56 | 48 | | |
57 | 49 | | |
58 | 50 | | |
59 | | - | |
60 | | - | |
61 | 51 | | |
62 | 52 | | |
63 | 53 | | |
| |||
70 | 60 | | |
71 | 61 | | |
72 | 62 | | |
73 | | - | |
74 | | - | |
| 63 | + | |
75 | 64 | | |
76 | 65 | | |
77 | 66 | | |
| |||
151 | 140 | | |
152 | 141 | | |
153 | 142 | | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | 143 | | |
165 | 144 | | |
166 | 145 | | |
0 commit comments