File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -176,6 +176,10 @@ export default function Projects() {
176176 )
177177 const ongoing = projects . filter ( ( p ) => p . category === 'Ongoing' )
178178
179+ const sortedProjects = [ ...projects ] . sort ( ( a , b ) =>
180+ ( a . name || '' ) . localeCompare ( b . name || '' , undefined , { sensitivity : 'base' } )
181+ )
182+
179183 return (
180184 < >
181185 < Container className = "mt-20 mb-28" >
@@ -201,12 +205,9 @@ export default function Projects() {
201205 </ div >
202206
203207 < div className = "mb-16 grid grid-cols-1 gap-x-8 gap-y-16 lg:grid-cols-3" >
204- { projects
205- . slice ( )
206- . sort ( ( a , b ) => a . name . localeCompare ( b . name ) )
207- . map ( ( product ) => (
208- < CardProduct key = { product . slug } product = { product } />
209- ) ) }
208+ { sortedProjects . map ( ( product ) => (
209+ < CardProduct key = { product . slug } product = { product } />
210+ ) ) }
210211 </ div >
211212
212213 { /*
You can’t perform that action at this time.
0 commit comments