@@ -2,6 +2,7 @@ import Layout from '@/components/Layout';
22import { useState } from 'react' ;
33import { diamondLinks , goldLinks , silverLinks , sponsorInfo } from '@/../public/data/sponsorInfos' ;
44import SponsorModal from '@/components/Sponsors/SponsorModal' ;
5+ import { EmojiRain } from 'next-emoji-rain' ;
56
67export default function SponsorsPage ( ) {
78 const logostyle =
@@ -15,10 +16,30 @@ export default function SponsorsPage() {
1516 setShowModal ( true ) ;
1617 } ;
1718
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+
1830 return (
1931 < 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 >
2041 < 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 >
2243 < div >
2344 < div className = "w-100 flex flex-col gap-16" >
2445 { showModal && (
@@ -38,7 +59,7 @@ export default function SponsorsPage() {
3859 </ div >
3960 </ div >
4061 </ 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 >
4263 < div >
4364 < div className = "flex flex-wrap rounded-[1rem] px-14 py-10 mb-14 gap-16 justify-evenly rounded border-2 border-[#595F6D] my-10" >
4465 { goldLinks . map ( ( item , index ) => {
@@ -50,7 +71,7 @@ export default function SponsorsPage() {
5071 } ) }
5172 </ div >
5273 </ 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 >
5475 < div >
5576 < div className = "flex flex-wrap rounded-[1rem] px-14 py-10 mb-14 gap-16 justify-evenly rounded border-2 border-[#595F6D] mt-10" >
5677 { silverLinks . map ( ( item , index ) => {
0 commit comments