mirror of
https://github.com/kamranahmedse/developer-roadmap.git
synced 2025-08-21 16:41:24 +02:00
Show the recently updated item on top
This commit is contained in:
@@ -101,7 +101,14 @@ export function ActivityPage() {
|
|||||||
Continue Following
|
Continue Following
|
||||||
</h2>
|
</h2>
|
||||||
<div class="flex flex-col gap-3">
|
<div class="flex flex-col gap-3">
|
||||||
{learningRoadmaps.reverse().map((roadmap) => (
|
{learningRoadmaps
|
||||||
|
.sort((a, b) => {
|
||||||
|
const updatedAtA = new Date(a.updatedAt);
|
||||||
|
const updatedAtB = new Date(b.updatedAt);
|
||||||
|
|
||||||
|
return updatedAtB.getTime() - updatedAtA.getTime();
|
||||||
|
})
|
||||||
|
.map((roadmap) => (
|
||||||
<ResourceProgress
|
<ResourceProgress
|
||||||
doneCount={roadmap.done || 0}
|
doneCount={roadmap.done || 0}
|
||||||
learningCount={roadmap.learning || 0}
|
learningCount={roadmap.learning || 0}
|
||||||
@@ -120,7 +127,14 @@ export function ActivityPage() {
|
|||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
|
|
||||||
{learningBestPractices.reverse().map((bestPractice) => (
|
{learningBestPractices
|
||||||
|
.sort((a, b) => {
|
||||||
|
const updatedAtA = new Date(a.updatedAt);
|
||||||
|
const updatedAtB = new Date(b.updatedAt);
|
||||||
|
|
||||||
|
return updatedAtB.getTime() - updatedAtA.getTime();
|
||||||
|
})
|
||||||
|
.map((bestPractice) => (
|
||||||
<ResourceProgress
|
<ResourceProgress
|
||||||
doneCount={bestPractice.done || 0}
|
doneCount={bestPractice.done || 0}
|
||||||
totalCount={bestPractice.total || 0}
|
totalCount={bestPractice.total || 0}
|
||||||
|
Reference in New Issue
Block a user