@@ -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,30 @@ 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 >
38
+ < div id = "silverRain" className = "opacity-0" >
39
+ < EmojiRain emoji = "🪩" />
40
+ </ div >
20
41
< section className = "py-8" >
21
- < h2 className = "text-4xl font-black text-center font-bold" > DIAMOND SPONSORS</ h2 >
42
+ < h2 className = "text-4xl font-black text-center font-bold" onClick = { ( ) => handleRainClick ( 'diamond' ) } > DIAMOND SPONSORS</ h2 >
22
43
< div >
23
44
< div className = "w-100 flex flex-col gap-16" >
24
45
{ showModal && (
@@ -38,7 +59,7 @@ export default function SponsorsPage() {
38
59
</ div >
39
60
</ div >
40
61
</ div >
41
- < h2 className = "text-4xl font-black text-center font-bold" > GOLD SPONSORS</ h2 >
62
+ < h2 className = "text-4xl font-black text-center font-bold" onClick = { ( ) => handleRainClick ( 'gold' ) } > GOLD SPONSORS</ h2 >
42
63
< div >
43
64
< 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
65
{ goldLinks . map ( ( item , index ) => {
@@ -50,7 +71,7 @@ export default function SponsorsPage() {
50
71
} ) }
51
72
</ div >
52
73
</ div >
53
- < h2 className = "text-4xl font-black text-center font-bold" > SILVER SPONSORS</ h2 >
74
+ < h2 className = "text-4xl font-black text-center font-bold" onClick = { ( ) => handleRainClick ( 'silver' ) } > SILVER SPONSORS</ h2 >
54
75
< div >
55
76
< div className = "flex flex-wrap rounded-[1rem] px-14 py-10 mb-14 gap-16 justify-evenly rounded border-2 border-[#595F6D] mt-10" >
56
77
{ silverLinks . map ( ( item , index ) => {
0 commit comments