Skip to content

Commit da8c763

Browse files
committed
remove devto and medium sorting
1 parent 0b9a15c commit da8c763

2 files changed

Lines changed: 8 additions & 12 deletions

File tree

src/features/cards/components/devtoCard/DevtoCard.tsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,10 @@ export function DevtoCard({ withAds, meta }: CardPropsType) {
3535

3636
const getData = () => {
3737
return filterUniqueEntries(
38-
results
39-
.reduce((acc: Article[], curr) => {
40-
if (!curr.data) return acc
41-
return [...acc, ...curr.data]
42-
}, [])
43-
.sort((a, b) => b.published_at - a.published_at)
38+
results.reduce((acc: Article[], curr) => {
39+
if (!curr.data) return acc
40+
return [...acc, ...curr.data]
41+
}, [])
4442
)
4543
}
4644

src/features/cards/components/mediumCard/MediumCard.tsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,10 @@ export function MediumCard({ meta, withAds }: CardPropsType) {
3434

3535
const getData = () => {
3636
return filterUniqueEntries(
37-
results
38-
.reduce((acc: Article[], curr) => {
39-
if (!curr.data) return acc
40-
return [...acc, ...curr.data]
41-
}, [])
42-
.sort((a, b) => b.published_at - a.published_at)
37+
results.reduce((acc: Article[], curr) => {
38+
if (!curr.data) return acc
39+
return [...acc, ...curr.data]
40+
}, [])
4341
)
4442
}
4543

0 commit comments

Comments
 (0)