1
- const LeaderboardPage = ( ) => {
2
- return (
3
- < >
4
- CP leaderboard
5
- </ >
6
- ) ;
1
+ "use client" ;
2
+ import { useState } from "react" ;
3
+
4
+ import { Profile , ProfileBottom } from "@/components/LeaderBoardProfiles"
5
+ import dynamic from 'next/dynamic' ;
6
+
7
+ const LeaderboardTable = dynamic ( ( ) => import ( "@/components/LeaderboardTable" ) , {
8
+ ssr : false ,
9
+ } ) ;
10
+
11
+ export default function LeaderBoard ( ) {
12
+ const [ alltimemode , setmode ] = useState ( false ) ;
13
+ return (
14
+ < div className = "w-full overflow-hidden gap-7 flex flex-col items-center bg-bgMainColor" >
15
+ < h1 className = "mt-5 text-center text-white text-[3rem] sm:text-[2.5rem] md:text-[4.2rem] lg:text-[5rem] font-medium" >
16
+ Leaderboard
17
+ </ h1 >
18
+ { /* Alltime/Monthly Switch */ }
19
+ < div className = "flex justify-evenly items-center rounded-xl bg-LeaderBoardCommon w-[50%]" >
20
+ < button
21
+ className = { `transition-colors duration-300 flex w-[50%] justify-center items-center rounded-md ${
22
+ alltimemode ? "bg-LeaderBoardCommonHigh" : "bg-LeaderBoardCommon" } `}
23
+ onClick = { ( ) => setmode ( ! alltimemode ) }
24
+ >
25
+ < p className = "text-lg font-semibold text-white mt-2 ml-2 mb-2" >
26
+ Month
27
+ </ p >
28
+ </ button >
29
+ < button
30
+ className = { `transition-colors duration-300 flex w-[50%] justify-center items-center rounded-md ${
31
+ alltimemode ? "bg-LeaderBoardCommon" : "bg-LeaderBoardCommonHigh" } `}
32
+ onClick = { ( ) => setmode ( ! alltimemode ) }
33
+ >
34
+ < p className = "text-lg font-semibold text-white mt-2 mr-2 mb-2" >
35
+ All Time
36
+ </ p >
37
+ </ button >
38
+ </ div >
39
+ { /* Top 3 Board */ }
40
+ < div className = "flex gap-[1%] sm:h-[200px] lg:h-[500px] lg:scale-100 sm:scale-[.38] md:scale-[.57] origin-top" >
41
+ < Profile mt = { 8 } rank = "Silver" />
42
+ < Profile rank = "Gold" />
43
+ < Profile mt = { 10 } rank = "Bronze" />
44
+ </ div >
45
+ < div className = "flex justify-center items-center z-10 md:mt-16 rounded-xl bg-LeaderBoardCommonHigh]" >
46
+ < p className = "text-lg sm:text-[1.5vh] md:text-[.8rem] lg:text-xl font-semibold text-white z-10 m-2" >
47
+ You have been placed at X rank with XXXX points.
48
+ </ p >
49
+ </ div >
50
+
51
+
52
+ { /*Table*/ }
53
+ < div className = "w-full" >
54
+ < LeaderboardTable />
55
+ </ div >
56
+
57
+ { /*Wall of Shame*/ }
58
+ < p className = "mt-5 text-center text-white text-[3rem] sm:text-[2.5rem] md:text-[4.2rem] lg:text-[5rem] font-medium" >
59
+ Wall of Shame
60
+ </ p >
61
+ < div className = "w-full" >
62
+ < div className = "flex flex-col md:scale-[.6] lg:scale-[1] md:flex-row justify-evenly items-center gap-4 sm:gap-6 md:gap-8 w-full" >
63
+ < ProfileBottom />
64
+ < ProfileBottom />
65
+ < ProfileBottom />
66
+ </ div >
67
+ </ div >
68
+ </ div >
69
+ ) ;
7
70
}
8
- export default LeaderboardPage ;
0 commit comments