@@ -9,16 +9,16 @@ import Link from "next/link";
99
1010const getLevelStyles = ( level : string ) => {
1111 switch ( level ) {
12- case ' WARMUP' :
13- return ' bg-teal-500/60 text-teal-100 border-teal-400/50' ;
14- case ' MEDIUM' :
15- return ' bg-yellow-500/60 text-yellow-100 border-yellow-400/50' ;
16- case ' HARDER' :
17- return ' bg-orange-500/60 text-orange-100 border-orange-400/50' ;
18- case ' INSANE' :
19- return ' bg-red-500/60 text-red-100 border-red-400/50' ;
12+ case " WARMUP" :
13+ return " bg-teal-500/60 text-teal-100 border-teal-400/50" ;
14+ case " MEDIUM" :
15+ return " bg-yellow-500/60 text-yellow-100 border-yellow-400/50" ;
16+ case " HARDER" :
17+ return " bg-orange-500/60 text-orange-100 border-orange-400/50" ;
18+ case " INSANE" :
19+ return " bg-red-500/60 text-red-100 border-red-400/50" ;
2020 default :
21- return ' bg-gray-500/60 text-gray-100 border-gray-400/50' ;
21+ return " bg-gray-500/60 text-gray-100 border-gray-400/50" ;
2222 }
2323} ;
2424
@@ -51,20 +51,26 @@ const WeekInfo = async ({ id }: { id: string }) => {
5151 < div className = "font-main text-primary-foreground" >
5252 { week . description }
5353 </ div >
54- < ul className = "text-white list-disc pl-4" >
54+ < ul className = "list-disc pl-4 text-white " >
5555 { week . resources . map ( ( resource , index ) => (
56- < li key = { index } className = "text-primary-foreground " >
56+ < li key = { index } className = "text-primary-foreground" >
5757 { resource }
5858 </ li >
5959 ) ) }
6060 </ ul >
6161 </ div >
6262
63- < div className = "rounded-xl bg-primary-light p-4 w-max " >
63+ < div className = "w-max rounded-xl bg-primary-light p-4" >
6464 < Subtitle label = "Resources" />
65- < div className = "font-main text-sm text-primary-foreground flex flex-col pr-5 " >
65+ < div className = "flex flex-col pr-5 font-main text-sm text-primary-foreground" >
6666 { week . detailResources . map ( ( resource , index ) => (
67- < Link href = { resource . url } key = { index } target = "_blank" rel = "noopener noreferrer" className = "underline hover:text-gray-100 text-nowrap" >
67+ < Link
68+ href = { resource . url }
69+ key = { index }
70+ target = "_blank"
71+ rel = "noopener noreferrer"
72+ className = "text-nowrap underline hover:text-gray-100"
73+ >
6874 { resource . title }
6975 </ Link >
7076 ) ) }
@@ -77,41 +83,45 @@ const WeekInfo = async ({ id }: { id: string }) => {
7783 < table className = "w-full" >
7884 < thead >
7985 < tr className = "border-b border-white text-left font-semibold text-white" >
80- < th > Problem </ th >
81- < th > Level </ th >
82- < th > Solved by </ th >
83- < th > Status </ th >
86+ < th className = "pb-2" > Problem </ th >
87+ < th className = "pb-2" > Level </ th >
88+ < th className = "pb-2" > Solved by </ th >
89+ < th className = "pb-2" > Status </ th >
8490 </ tr >
8591 </ thead >
8692 < tbody >
8793 { week . problems . map ( ( problem ) => (
88- < tr key = { problem . id } className = "text-white" >
89- < td >
94+ < tr key = { problem . id } className = "text-white transition duration-300 hover:scale-[1.01] hover:bg-gray-800/50 cursor-pointer " >
95+ < td className = "py-2" >
9096 < a
9197 href = { problem . leetcodeUrl }
9298 target = "_blank"
9399 rel = "noopener noreferrer"
94100 className = "hover:underline"
95101 >
96102 < div className = "flex flex-row items-center gap-2" >
97- { problem . recommended && (
98- < IoIosStar />
99- ) }
103+ { problem . recommended && < IoIosStar /> }
100104 { problem . name }
101105 </ div >
102106 </ a >
103107 </ td >
104- < td >
105- < span className = { `px-2 py-1 rounded-full text-xs font-medium border ${ getLevelStyles ( problem . level ) } ` } >
106- { problem . level . charAt ( 0 ) . toUpperCase ( ) + problem . level . slice ( 1 ) . toLowerCase ( ) }
108+ < td className = "py-2" >
109+ < span
110+ className = { `rounded-full border px-2 py-1 text-xs font-medium ${ getLevelStyles ( problem . level ) } ` }
111+ >
112+ { problem . level . charAt ( 0 ) . toUpperCase ( ) +
113+ problem . level . slice ( 1 ) . toLowerCase ( ) }
107114 </ span >
108115 </ td >
109- < td > { problem . solvedBy ?. length ?? 0 } </ td >
110- < td >
116+ < td className = "py-2" > { problem . solvedBy ?. length ?? 0 } </ td >
117+ < td className = "py-2" >
111118 { userId ? (
112119 < SolvedToggle
113120 problemId = { problem . id }
114- initialSolved = { problem . solvedBy ?. some ( ( u ) => u . id === userId ) ?? false }
121+ initialSolved = {
122+ problem . solvedBy ?. some ( ( u ) => u . id === userId ) ??
123+ false
124+ }
115125 userId = { userId }
116126 />
117127 ) : (
0 commit comments