@@ -9,28 +9,46 @@ import Graphweaver from "public/img/conf/Sponsors/Graphweaver.svg"
9
9
import { clsx } from "clsx"
10
10
import NextImage from "next-image-export-optimizer"
11
11
12
- interface Image {
12
+ type LogosType = {
13
13
icon : string
14
14
name : string
15
15
link : string
16
16
}
17
17
18
- const sponsorDiamond : Image [ ] = [
19
- { icon : TheGuild , name : "The Guild" , link : "https://the-guild.dev" } ,
20
- { icon : IBM , name : "IBM" , link : "https://www.ibm.com/products/api-connect" } ,
21
- ]
22
-
23
- const sponsorPlatinum : Image [ ] = [ ]
24
-
25
- const sponsorGold : Image [ ] = [
26
- { icon : Apollo , name : "Apollo" , link : "https://www.apollographql.com/" } ,
27
- { icon : Graphweaver , name : "Graphweaver" , link : "https://graphweaver.com" } ,
28
- { icon : Hasura , name : "Hasura" , link : "https://hasura.io" } ,
29
- ]
30
-
31
- const sponsorSilver : Image [ ] = [
32
- { icon : Stellate , name : "Stellate" , link : "https://stellate.co" } ,
33
- { icon : Tyk , name : "Tyk" , link : "https://tyk.io/" } ,
18
+ const SPONSORS : Array < {
19
+ title : string
20
+ logos : Array < LogosType >
21
+ } > = [
22
+ {
23
+ title : "Diamond" ,
24
+ logos : [
25
+ { icon : TheGuild , name : "The Guild" , link : "https://the-guild.dev" } ,
26
+ {
27
+ icon : IBM ,
28
+ name : "IBM" ,
29
+ link : "https://www.ibm.com/products/api-connect" ,
30
+ } ,
31
+ ] ,
32
+ } ,
33
+ {
34
+ title : "Gold" ,
35
+ logos : [
36
+ { icon : Apollo , name : "Apollo" , link : "https://www.apollographql.com/" } ,
37
+ {
38
+ icon : Graphweaver ,
39
+ name : "Graphweaver" ,
40
+ link : "https://graphweaver.com" ,
41
+ } ,
42
+ { icon : Hasura , name : "Hasura" , link : "https://hasura.io" } ,
43
+ ] ,
44
+ } ,
45
+ {
46
+ title : "Silver" ,
47
+ logos : [
48
+ { icon : Stellate , name : "Stellate" , link : "https://stellate.co" } ,
49
+ { icon : Tyk , name : "Tyk" , link : "https://tyk.io/" } ,
50
+ ] ,
51
+ } ,
34
52
]
35
53
36
54
function List ( {
@@ -39,7 +57,7 @@ function List({
39
57
linkClassName,
40
58
} : {
41
59
className ?: string
42
- items : Image [ ]
60
+ items : Array < LogosType >
43
61
linkClassName ?: string
44
62
} ) {
45
63
return (
@@ -80,58 +98,20 @@ export function PastSponsors() {
80
98
return (
81
99
< section >
82
100
< h1 className = "conf-heading mb-12" > Thanks to our 2024 sponsors!</ h1 >
83
- { sponsorDiamond . length > 0 && (
101
+ { SPONSORS . map ( ( { title , logos } , i ) => (
84
102
< >
85
103
< div className = "flex items-center gap-2 mb-2 border-b-2 border-dotted pb-1.5 border-white/40" >
86
- < div className = "size-2.5 bg-[#E10098]" > </ div >
87
- < h3 className = " font-medium" > DIAMOND</ h3 >
104
+ { /* Square box */ }
105
+ < div className = "size-2.5 bg-primary" />
106
+ < h3 className = " font-medium uppercase" > { title } </ h3 >
88
107
</ div >
89
108
< List
90
- items = { sponsorDiamond }
109
+ items = { logos }
91
110
className = "flex"
92
111
linkClassName = "p-8 lg:p-16 h-28 lg:h-[220px]"
93
112
/>
94
113
</ >
95
- ) }
96
- { sponsorPlatinum . length > 0 && (
97
- < >
98
- < div className = "flex items-center gap-2 mb-2 border-b-2 border-dotted pb-1.5 border-white/40" >
99
- < div className = "size-2.5 bg-[#E10098]" > </ div >
100
- < h3 className = " font-medium" > PLATINUM</ h3 >
101
- </ div >
102
- < List
103
- items = { sponsorPlatinum }
104
- className = "flex"
105
- linkClassName = "p-8 lg:py-14 h-28 lg:h-[210px]"
106
- />
107
- </ >
108
- ) }
109
- { sponsorGold . length > 0 && (
110
- < >
111
- < div className = "flex items-center gap-2 mb-2 border-b-2 border-dotted pb-1.5 border-white/40" >
112
- < div className = "size-2.5 bg-[#E10098]" > </ div >
113
- < h3 className = " font-medium" > GOLD</ h3 >
114
- </ div >
115
- < List
116
- items = { sponsorGold }
117
- className = "flex"
118
- linkClassName = "p-8 lg:py-14 h-28 lg:h-[170px]"
119
- />
120
- </ >
121
- ) }
122
- { sponsorSilver . length > 0 && (
123
- < >
124
- < div className = "flex items-center gap-2 mb-2 border-b-2 border-dotted pb-1.5 border-white/40" >
125
- < div className = "size-2.5 bg-[#E10098]" > </ div >
126
- < h3 className = "font-medium" > SILVER</ h3 >
127
- </ div >
128
- < List
129
- items = { sponsorSilver }
130
- className = "flex"
131
- linkClassName = "p-6 lg:p-10 h-28 lg:h-[155px]"
132
- />
133
- </ >
134
- ) }
114
+ ) ) }
135
115
</ section >
136
116
)
137
117
}
0 commit comments