1- import { diamondLinks , goldLinks , silverLinks } from '../../../public/data/data' ;
1+ import { useState } from 'react' ;
2+ import { diamondLinks , goldLinks , silverLinks , sponsorInfo } from '../../../public/data/data' ;
3+ import SponsorModal from './sponsorModal' ;
24//import '/styles/sponsorLinks.module.css';
35const logostyle = 'h-14' ;
46const logodiv = 'block gap-y-8 h-14' ;
57const background = 'rgba(57, 119, 248, 0.6)' ;
68// const outer = 'rounded-[4rem] w-[90rem] flex flex-col pl-14 py-14 gap-16';
79
10+
11+
812function SponsorLinks ( ) {
13+ const [ showModal , setShowModal ] = useState ( false ) ;
14+ const [ information , setInformation ] = useState < sponsorInfo | null > ( null ) ;
15+
916 return (
1017 < div className = "flex justify-center items-center my-20" >
11- < div className = "w-100 flex flex-col gap-16" >
18+ < div className = "w-100 flex flex-col gap-16" >
19+ { /* @ts -ignore */ }
20+ { showModal && < SponsorModal sponsorInfo = { information } setFalse = { ( ) => { setShowModal ( false ) } } /> }
1221 < div
1322 style = { { backgroundColor : `${ background } ` } }
1423 className = "flex flex-wrap rounded-[1rem] pl-14 py-14 gap-16 items-center"
1524 >
1625 < h2 className = "text-4xl font-black" > Diamond Sponsors</ h2 >
1726 { diamondLinks . map ( ( item , index ) => {
1827 return (
19- < a key = { index } className = { `${ logodiv } ` } href = { item . href } >
28+ < div key = { index } className = { `${ logodiv } ` }
29+ // href={item.href}
30+ onClick = { ( ) => {
31+ setInformation ( item ) ;
32+ setShowModal ( true ) ;
33+ } }
34+ >
2035 < img className = { `${ logostyle } ` } src = { item . svg } alt = { item . alt } />
21- </ a >
36+ </ div >
2237 ) ;
2338 } ) }
2439 </ div >
@@ -29,9 +44,15 @@ function SponsorLinks() {
2944 < h2 className = "text-4xl font-black" > Gold Sponsors</ h2 >
3045 { goldLinks . map ( ( item , index ) => {
3146 return (
32- < a key = { index } className = "" href = { item . href } >
47+ < div key = { index } className = ""
48+ onClick = { ( ) => {
49+ setInformation ( item ) ;
50+ setShowModal ( true ) ;
51+ } }
52+ // href={item.href}
53+ >
3354 < img className = "h-6" src = { item . svg } alt = { item . alt } />
34- </ a >
55+ </ div >
3556 ) ;
3657 } ) }
3758 </ div >
0 commit comments