mirror of
https://github.com/ArthurDanjou/website.git
synced 2026-01-14 12:14:42 +01:00
Update experiences sorting
This commit is contained in:
@@ -17,12 +17,11 @@ export function getEducations() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function getWorkExperiences() {
|
export function getWorkExperiences() {
|
||||||
return useAsyncData('content:experiences', () => {
|
return useAsyncData('content:experiences', async () => {
|
||||||
return queryContent<WorkExperience>('experiences')
|
const experiences = await queryContent<WorkExperience>('experiences').find()
|
||||||
.sort({
|
return experiences.sort((a, b) => {
|
||||||
endDate: -1,
|
return new Date(b.startDate).getTime() - new Date(a.startDate).getTime()
|
||||||
})
|
})
|
||||||
.find()
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user