Commit 57b04ed 1 parent 0e48893 commit 57b04ed Copy full SHA for 57b04ed
File tree 1 file changed +18
-1
lines changed
1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,23 @@ function SponsorsList({
52
52
[ isDarkTheme ]
53
53
)
54
54
55
+ const givenOrder : string [ ] = [
56
+ 'platinum' ,
57
+ 'gold' ,
58
+ 'silver' ,
59
+ 'bronze' ,
60
+ 'startup' ,
61
+ 'swag' ,
62
+ 'venue' ,
63
+ ]
64
+
65
+ const sortedSponsors = sponsors . sort ( ( a , b ) => {
66
+ return (
67
+ givenOrder . indexOf ( givenOrder . find ( ( g ) => a . sponsor_type === g ) || '' ) -
68
+ givenOrder . indexOf ( givenOrder . find ( ( g ) => b . sponsor_type === g ) || '' )
69
+ )
70
+ } )
71
+
55
72
return (
56
73
< section className = "w-full dark:bg-black" >
57
74
< div className = "s-container" >
@@ -122,7 +139,7 @@ function SponsorsList({
122
139
123
140
{ showSponsors && (
124
141
< div className = "grid grid-cols-2 md:grid-cols-3 border-t" >
125
- { sponsors
142
+ { sortedSponsors
126
143
. filter ( ( s ) => s . sponsor_type !== 'platinum' )
127
144
. map ( ( sponsor ) => (
128
145
< div
You can’t perform that action at this time.
0 commit comments