File tree Expand file tree Collapse file tree 1 file changed +15
-12
lines changed
src/pages/Works/WorksContainer Expand file tree Collapse file tree 1 file changed +15
-12
lines changed Original file line number Diff line number Diff line change @@ -170,18 +170,21 @@ const WorksContainer = () => {
170170 < div className = 'text' > Ver</ div >
171171 </ div >
172172 </ CustomCursor >
173- { works . map ( ( work , index ) => (
174- < WorkItem
175- title = { work . title }
176- description = { work . description }
177- dev = { work . dev }
178- year = { dayjs ( work . year ) . format ( 'YYYY' ) }
179- panel = { work . panel }
180- type = { work . type }
181- setScale = { setScale }
182- link = { work . link }
183- />
184- ) ) }
173+ { works
174+ . sort ( ( a , b ) => b . year . getTime ( ) - a . year . getTime ( ) )
175+ . map ( ( work , index ) => (
176+ < WorkItem
177+ key = { index }
178+ title = { work . title }
179+ description = { work . description }
180+ dev = { work . dev }
181+ year = { dayjs ( work . year ) . format ( 'YYYY' ) }
182+ panel = { work . panel }
183+ type = { work . type }
184+ setScale = { setScale }
185+ link = { work . link }
186+ />
187+ ) ) }
185188 </ div >
186189 )
187190}
You can’t perform that action at this time.
0 commit comments