File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -69,23 +69,21 @@ export default function PaperCard({ subject, slots }: PaperCardProps) {
6969 return (
7070 < div
7171 onClick = { ( e ) => {
72- if ( ! paperCount ) return ; // disable click if no papers
7372 e . preventDefault ( ) ;
7473 const queryParams = new URLSearchParams ( { subject } ) ;
7574 router . push ( `/catalogue?${ queryParams . toString ( ) } ` ) ;
7675 } }
7776 className = { `h-full rounded-sm border-2 border-[#734DFF] bg-[#FFFFFF] text-black shadow-lg transition duration-150 ease-in-out dark:border-[#36266D] dark:bg-[#171720] dark:text-white ${
78- ! paperCount
79- ? "cursor-not-allowed opacity-60 hover:bg-[#FFFFFF] dark:hover:bg-[#171720]"
80- : "cursor-pointer hover:bg-[#EFEAFF] hover:dark:bg-[#262635]"
77+ // ? "cursor-not-allowed opacity-60 hover:bg-[#FFFFFF] dark:hover:bg-[#171720]"
78+ "cursor-pointer hover:bg-[#EFEAFF] hover:dark:bg-[#262635]"
8179 } `}
8280 >
8381 < div className = "border-b-2 border-[#453D60] p-2" >
8482 < div className = "flex items-start justify-between" >
8583 < h2 className = "rounded-t-lg px-2 py-1 font-play text-base font-bold md:text-lg md:tracking-widest" >
8684 { courseCode }
8785 < div className = "text-sm font-normal" >
88- ( Papers available: { paperCount } )
86+ { paperCount ? ` Papers available: $ {paperCount } ` : "Click to explore" }
8987 </ div >
9088 </ h2 >
9189
@@ -112,15 +110,11 @@ export default function PaperCard({ subject, slots }: PaperCardProps) {
112110 { courseName }
113111 </ h2 >
114112
115- { paperCount ? (
113+ { (
116114 < div className = "mt-4 flex flex-wrap gap-2 font-play" >
117115 { slots ?. map ( ( slotValue ) => capsule ( slotValue ) ) }
118116 </ div >
119- ) : (
120- < div className = "mt-6 text-sm italic text-gray-500 dark:text-gray-400" >
121- We will have papers for this soon!
122- </ div >
123- ) }
117+ ) }
124118 </ div >
125119 </ div >
126120 ) ;
You can’t perform that action at this time.
0 commit comments