11"use client" ;
22
33import { useEffect , useState } from "react" ;
4- import Image from "next/image" ;
54import Link from "next/link" ;
65import { BookOpen , CircleCheckBig , Trophy } from "lucide-react" ;
76
87import type { SelectHackathon } from "@forge/db/schemas/knight-hacks" ;
9- import {
10- Dialog ,
11- DialogContent ,
12- DialogHeader ,
13- DialogTitle ,
14- DialogTrigger ,
15- } from "@forge/ui/dialog" ;
8+ import { Dialog , DialogTrigger } from "@forge/ui/dialog" ;
169
1710import type { api as serverCall } from "~/trpc/server" ;
1811import { HackerQRCodePopup } from "~/app/_components/dashboard/hacker-dashboard/hacker-qr-button" ;
1912import { DownloadQRPass } from "~/app/_components/dashboard/member-dashboard/download-qr-pass" ;
2013import { HACKER_STATUS_MAP } from "~/consts" ;
2114import { api } from "~/trpc/react" ;
2215import { BaseHackathonIssueButton } from "./issue-dialog" ;
23- import { BaseHackathonPointLeaderboard } from "./point-leaderboard" ;
2416
2517type StatusKey = keyof typeof HACKER_STATUS_MAP | null | undefined ;
2618type HackerProfile = Awaited <
@@ -55,16 +47,10 @@ export function BaseHackathonData({
5547 data,
5648 guideHref,
5749 hackathon,
58- teamColor,
59- team,
60- classPfp,
6150} : {
6251 data : HackerProfile ;
6352 guideHref : string ;
6453 hackathon : SelectHackathon ;
65- teamColor : string ;
66- team : string ;
67- classPfp : string ;
6854} ) {
6955 const [ hackerStatus , setHackerStatus ] = useState < string | null > ( "" ) ;
7056 const [ hackerStatusColor , setHackerStatusColor ] = useState < string > ( "" ) ;
@@ -117,32 +103,10 @@ export function BaseHackathonData({
117103 </ h1 >
118104 ) }
119105
120- < div className = "animate-fade-in flex flex-wrap items-center justify-center gap-2 text-base text-muted-foreground sm:text-base md:justify-start" >
121- < span
122- className = "font-medium"
123- style = { {
124- color : teamColor ,
125- textShadow : `0 0 10px ${ teamColor } , 0 0 20px ${ teamColor } ` ,
126- } }
127- >
128- { hacker ?. class }
129- </ span >
130- < span className = "text-border" > •</ span >
131- < span
132- className = "font-semibold text-foreground"
133- style = { {
134- color : teamColor ,
135- textShadow : `0 0 10px ${ teamColor } , 0 0 20px ${ teamColor } ` ,
136- } }
137- >
138- { "Team " + team }
139- </ span >
140- </ div >
141-
142106 { /* Status Badge */ }
143107 < div className = "animate-fade-in flex flex-col items-center space-y-3 md:items-start md:justify-start" >
144108 < p className = "text-center text-xs font-semibold uppercase tracking-wider text-muted-foreground sm:text-[10px] md:text-start" >
145- Status for { hackathon . displayName }
109+ Application Status
146110 </ p >
147111 < div className = "inline-flex items-center gap-2.5 rounded-full bg-background shadow-sm" >
148112 < span
@@ -158,18 +122,6 @@ export function BaseHackathonData({
158122 </ div >
159123 </ div >
160124 </ div >
161-
162- { /* TK Image */ }
163- < div className = "animate-fade-in relative h-28 w-28 flex-shrink-0 self-center overflow-hidden shadow-sm sm:h-32 sm:w-32 sm:self-start" >
164- < Image
165- src = { classPfp }
166- alt = "Team Mascot Image"
167- fill
168- className = "rounded-full object-cover"
169- priority
170- sizes = "(max-width: 800px) 112px, 128px"
171- />
172- </ div >
173125 </ div >
174126 </ div >
175127
@@ -200,19 +152,19 @@ export function BaseHackathonData({
200152 { /* Decorative gradient overlay */ }
201153 < div
202154 className = "absolute right-0 top-0 h-24 w-24 -translate-y-8 translate-x-8 rounded-full blur-3xl sm:h-32 sm:w-32 sm:-translate-y-10 sm:translate-x-10"
203- style = { { backgroundColor : `${ teamColor } 20 ` } }
155+ style = { { backgroundColor : `primary ` } }
204156 />
205157
206158 < div className = "relative" >
207159 { /* Icon */ }
208160 < div className = "mb-2 flex justify-center sm:mb-3" >
209161 < div
210162 className = "rounded-full p-2 sm:p-2.5"
211- style = { { backgroundColor : `${ teamColor } 20 ` } }
163+ style = { { backgroundColor : `primary ` } }
212164 >
213165 < Trophy
214166 className = "h-6 w-6 sm:h-7 sm:w-7"
215- style = { { color : teamColor } }
167+ style = { { color : "primary" } }
216168 />
217169 </ div >
218170 </ div >
@@ -231,15 +183,15 @@ export function BaseHackathonData({
231183 < div
232184 className = "rounded-xl px-4 py-3 sm:px-6 sm:py-5"
233185 style = { {
234- background : `linear-gradient(to bottom right, ${ teamColor } 33, ${ teamColor } 0d )` ,
235- boxShadow : `0 0 20px ${ teamColor } 40 ` ,
186+ background : `linear-gradient(to bottom right, primary, primary )` ,
187+ boxShadow : `0 0 20px primary ` ,
236188 } }
237189 >
238190 < div
239191 className = "text-center text-4xl font-bold tabular-nums tracking-tight sm:text-6xl"
240192 style = { {
241- color : teamColor ,
242- textShadow : `0 0 10px ${ teamColor } 80 ` ,
193+ color : "primary" ,
194+ textShadow : `0 0 10px primary ` ,
243195 } }
244196 >
245197 { hacker ?. points || 0 }
@@ -251,28 +203,19 @@ export function BaseHackathonData({
251203 < button
252204 className = "w-full rounded-lg py-2 text-sm font-semibold transition-all hover:shadow-md sm:py-2.5"
253205 style = { {
254- backgroundColor : `${ teamColor } 20 ` ,
255- color : teamColor ,
206+ backgroundColor : `primary ` ,
207+ color : "secondary" ,
256208 } }
257209 onMouseEnter = { ( e ) => {
258- e . currentTarget . style . backgroundColor = `${ teamColor } 33 ` ;
210+ e . currentTarget . style . backgroundColor = `primary ` ;
259211 } }
260212 onMouseLeave = { ( e ) => {
261- e . currentTarget . style . backgroundColor = `${ teamColor } 20 ` ;
213+ e . currentTarget . style . backgroundColor = `primary ` ;
262214 } }
263215 >
264216 View Leaderboard
265217 </ button >
266218 </ DialogTrigger >
267- < DialogContent >
268- < DialogHeader >
269- < DialogTitle > Leaderboard</ DialogTitle >
270- </ DialogHeader >
271- < BaseHackathonPointLeaderboard
272- hacker = { hacker }
273- hId = { hackathon . name }
274- />
275- </ DialogContent >
276219 </ Dialog >
277220 </ div >
278221 </ div >
0 commit comments