@@ -2,6 +2,7 @@ import Layout from '@/components/Layout';
2
2
import { useState } from 'react' ;
3
3
import { diamondLinks , goldLinks , silverLinks , sponsorInfo } from '@/../public/data/sponsorInfos' ;
4
4
import SponsorModal from '@/components/Sponsors/SponsorModal' ;
5
+ import { EmojiRain } from 'next-emoji-rain' ;
5
6
6
7
export default function SponsorsPage ( ) {
7
8
const logostyle =
@@ -15,10 +16,27 @@ export default function SponsorsPage() {
15
16
setShowModal ( true ) ;
16
17
} ;
17
18
19
+ const handleRainClick = ( type : string ) => {
20
+ const rainElement = document . getElementById ( `${ type } Rain` ) ;
21
+
22
+ if ( ! rainElement ) return ;
23
+
24
+ rainElement . classList . toggle ( 'opacity-0' , false ) ;
25
+ setTimeout ( ( ) => {
26
+ rainElement . classList . toggle ( 'opacity-0' , true ) ;
27
+ } , 4000 ) ;
28
+ } ;
29
+
18
30
return (
19
31
< Layout >
32
+ < div id = "diamondRain" className = "opacity-0" >
33
+ < EmojiRain emoji = "💎" />
34
+ </ div >
35
+ < div id = "goldRain" className = "opacity-0" >
36
+ < EmojiRain emoji = "🪙" />
37
+ </ div >
20
38
< section className = "py-8" >
21
- < h2 className = "text-4xl font-black text-center font-bold" > DIAMOND SPONSORS</ h2 >
39
+ < h2 className = "text-4xl font-black text-center font-bold" onClick = { ( ) => handleRainClick ( 'diamond' ) } > DIAMOND SPONSORS</ h2 >
22
40
< div >
23
41
< div className = "w-100 flex flex-col gap-16" >
24
42
{ showModal && (
@@ -38,7 +56,7 @@ export default function SponsorsPage() {
38
56
</ div >
39
57
</ div >
40
58
</ div >
41
- < h2 className = "text-4xl font-black text-center font-bold" > GOLD SPONSORS</ h2 >
59
+ < h2 className = "text-4xl font-black text-center font-bold" onClick = { ( ) => handleRainClick ( 'gold' ) } > GOLD SPONSORS</ h2 >
42
60
< div >
43
61
< div className = "flex flex-wrap rounded-[1rem] px-14 py-10 mb-14 gap-16 justify-evenly rounded border-2 border-[#595F6D] my-10" >
44
62
{ goldLinks . map ( ( item , index ) => {
0 commit comments