adrianhajdin / project_professional_portfolio

This is a code repository for the corresponding YouTube video. In this tutorial we are going to build and deploy a real time chat application. Covered topics: React.js, SCSS, Framer Motion, Sanity
https://jsmastery.pro
2.07k stars 496 forks source link

Skill Experience Year Not in Timeline Order #31

Open EARider23 opened 2 years ago

EARider23 commented 2 years ago

I Create TimeLine of my work in sanity database of experience section. if i add 2022 first. After i will add 2018 it will goes on top of 2022. Next i add 2019 it will go top of 2018. i want to make it order-wise. how to do that ? Screenshot 2022-07-23 133733

rahulmore01 commented 2 years ago

send me code of your skills.jsx file , cause im having trouble where im not able to see added info other than year. ![Uploading Screenshot 2022-07-23 at 9.37.29 AM.png…]()

EARider23 commented 2 years ago

https://github.com/EARider23/AN_Portfolio/blob/main/src/container/Skills/Skills.jsx

PattyCoding123 commented 2 years ago

What I did to sort the array was just by calling the sort method on the experiences array and passing a callback function which compared the year property.

sorting skills .

rahulmore01 commented 2 years ago

What I did to sort the array was just by calling the sort method on the experiences array and passing a callback function which compared the year property.

sorting skills .

bro please give me your insta or fb or linked in. i want to discuss an issue

asd1495 commented 2 years ago

const query = '*[_type == "experiences"] | order(year asc)';

This should solve the problem