Commit 22db278
refactor: consolidate formatFileSize duplicates to shared formatBytes
- Update app/documents/page.tsx to use formatBytes from lib/format
- Update app/my-data/page.tsx to use formatBytes from lib/format
- Update components/shared/demo/DemoFileUpload.tsx to use formatBytes
- Update workspaceUtils.ts to re-export formatBytes as formatFileSize
DRY: 4 duplicate formatFileSize implementations → 1 SSOT (lib/format.ts)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>1 parent f195154 commit 22db278
5 files changed
Lines changed: 10 additions & 32 deletions
File tree
- app
- bots/legal-expert/components/demo/workspace
- documents
- my-data
Lines changed: 3 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
| 4 | + | |
| 5 | + | |
13 | 6 | | |
14 | 7 | | |
15 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
323 | 324 | | |
324 | 325 | | |
325 | 326 | | |
326 | | - | |
327 | | - | |
328 | | - | |
329 | | - | |
330 | | - | |
331 | | - | |
332 | 327 | | |
333 | 328 | | |
334 | 329 | | |
| |||
479 | 474 | | |
480 | 475 | | |
481 | 476 | | |
482 | | - | |
| 477 | + | |
483 | 478 | | |
484 | 479 | | |
485 | 480 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
207 | 208 | | |
208 | 209 | | |
209 | 210 | | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | 211 | | |
217 | 212 | | |
218 | 213 | | |
| |||
369 | 364 | | |
370 | 365 | | |
371 | 366 | | |
372 | | - | |
| 367 | + | |
373 | 368 | | |
374 | 369 | | |
375 | 370 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | 25 | | |
31 | 26 | | |
32 | 27 | | |
| |||
222 | 217 | | |
223 | 218 | | |
224 | 219 | | |
225 | | - | |
| 220 | + | |
226 | 221 | | |
227 | 222 | | |
228 | 223 | | |
| |||
Large diffs are not rendered by default.
0 commit comments