Spaces:
Running
Running
Commit ·
cf67b2a
1
Parent(s): cfb7830
fix: sort articles by score within each date group
Browse files
frontend/dist/assets/index-R2V5GmAY.js
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
frontend/dist/index.html
CHANGED
|
@@ -5,7 +5,7 @@
|
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
<title>News Digest</title>
|
| 7 |
<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Serif:ital,wght@0,400;0,600;0,700;1,400&family=Lora:wght@400;600;700&display=swap" rel="stylesheet">
|
| 8 |
-
<script type="module" crossorigin src="/assets/index-
|
| 9 |
<link rel="stylesheet" crossorigin href="/assets/index-DI9qLnC9.css">
|
| 10 |
</head>
|
| 11 |
<body>
|
|
|
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
<title>News Digest</title>
|
| 7 |
<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Serif:ital,wght@0,400;0,600;0,700;1,400&family=Lora:wght@400;600;700&display=swap" rel="stylesheet">
|
| 8 |
+
<script type="module" crossorigin src="/assets/index-R2V5GmAY.js"></script>
|
| 9 |
<link rel="stylesheet" crossorigin href="/assets/index-DI9qLnC9.css">
|
| 10 |
</head>
|
| 11 |
<body>
|
frontend/src/App.jsx
CHANGED
|
@@ -22,7 +22,10 @@ function groupByDate(clusters) {
|
|
| 22 |
if (b[0] === 'Unknown') return -1
|
| 23 |
return b[0].localeCompare(a[0])
|
| 24 |
})
|
| 25 |
-
return sorted.map(([date, items]) => ({
|
|
|
|
|
|
|
|
|
|
| 26 |
}
|
| 27 |
|
| 28 |
function SafeImage({ src, className, wrapClass }) {
|
|
|
|
| 22 |
if (b[0] === 'Unknown') return -1
|
| 23 |
return b[0].localeCompare(a[0])
|
| 24 |
})
|
| 25 |
+
return sorted.map(([date, items]) => ({
|
| 26 |
+
date,
|
| 27 |
+
items: items.sort((a, b) => (b.score || 0) - (a.score || 0)),
|
| 28 |
+
}))
|
| 29 |
}
|
| 30 |
|
| 31 |
function SafeImage({ src, className, wrapClass }) {
|