Commit ce78b1b 1 parent 9c48b16 commit ce78b1b Copy full SHA for ce78b1b
File tree 1 file changed +19
-1
lines changed
1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ function SponsorsList({
26
26
27
27
const getImageClass = useCallback (
28
28
( sponsor : Sponsor ) => {
29
+ if ( sponsor . name . includes ( 'Flutter Dev' ) ) return 'max-h-[56px]'
29
30
if ( sponsor . name . includes ( 'JetBrains' ) ) return 'max-h-20'
30
31
if ( sponsor . name . includes ( 'Composables' ) ) return 'max-h-[48px]'
31
32
if ( sponsor . name . includes ( 'JumaAndMiles' ) ) return 'max-h-24'
@@ -52,6 +53,23 @@ function SponsorsList({
52
53
[ isDarkTheme ]
53
54
)
54
55
56
+ const givenOrder : string [ ] = [
57
+ 'platinum' ,
58
+ 'gold' ,
59
+ 'silver' ,
60
+ 'bronze' ,
61
+ 'startup' ,
62
+ 'swag' ,
63
+ 'venue' ,
64
+ ]
65
+
66
+ const sortedSponsors = sponsors . sort ( ( a , b ) => {
67
+ return (
68
+ givenOrder . indexOf ( givenOrder . find ( ( g ) => a . sponsor_type === g ) || '' ) -
69
+ givenOrder . indexOf ( givenOrder . find ( ( g ) => b . sponsor_type === g ) || '' )
70
+ )
71
+ } )
72
+
55
73
return (
56
74
< section className = "w-full dark:bg-black" >
57
75
< div className = "s-container" >
@@ -123,7 +141,7 @@ function SponsorsList({
123
141
124
142
{ showSponsors && (
125
143
< div className = "grid grid-cols-2 md:grid-cols-3 border-t" >
126
- { sponsors
144
+ { sortedSponsors
127
145
. filter ( ( s ) => s . sponsor_type !== 'platinum' )
128
146
. map ( ( sponsor ) => (
129
147
< div
You can’t perform that action at this time.
0 commit comments