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() {
|
||||
return useAsyncData('content:experiences', () => {
|
||||
return queryContent<WorkExperience>('experiences')
|
||||
.sort({
|
||||
endDate: -1,
|
||||
return useAsyncData('content:experiences', async () => {
|
||||
const experiences = await queryContent<WorkExperience>('experiences').find()
|
||||
return experiences.sort((a, b) => {
|
||||
return new Date(b.startDate).getTime() - new Date(a.startDate).getTime()
|
||||
})
|
||||
.find()
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user