@@ -16,7 +16,9 @@ export default function ProjectCardLarge({ project, highlighted = false }) {
16
16
: "border border-gray-200" ;
17
17
18
18
return (
19
- < div className = { `flex flex-col h-full ${ borderClass } rounded-lg overflow-hidden transition-all duration-300 hover:border-blue-500 hover:shadow-lg` } >
19
+ < div
20
+ className = { `flex flex-col h-full ${ borderClass } rounded-lg overflow-hidden transition-all duration-300 hover:border-blue-500 hover:shadow-lg` }
21
+ >
20
22
{ /* Header */ }
21
23
< div className = "bg-gray-800 text-white p-2 flex justify-between" >
22
24
< span > { project . group } </ span >
@@ -27,25 +29,33 @@ export default function ProjectCardLarge({ project, highlighted = false }) {
27
29
{ /* Match Percentage */ }
28
30
< div
29
31
className = { `absolute top-2 left-2 text-xs px-2 py-1 rounded font-bold ${
30
- project . matchPercentage >= 90 ? "bg-green-700 text-white"
31
- : project . matchPercentage >= 80 ? "bg-green-600 text-white"
32
- : project . matchPercentage >= 70 ? "bg-yellow-600 text-white"
33
- : project . matchPercentage >= 60 ? "bg-yellow-500 text-white"
34
- : project . matchPercentage >= 50 ? "bg-yellow-400 text-white"
35
- : project . matchPercentage >= 40 ? "bg-orange-600 text-white"
36
- : project . matchPercentage >= 30 ? "bg-orange-500 text-white"
37
- : project . matchPercentage >= 20 ? "bg-red-600 text-white"
38
- : "bg-red-700 text-white"
32
+ project . match_percentage >= 90
33
+ ? "bg-green-700 text-white"
34
+ : project . match_percentage >= 80
35
+ ? "bg-green-600 text-white"
36
+ : project . match_percentage >= 70
37
+ ? "bg-yellow-600 text-white"
38
+ : project . match_percentage >= 60
39
+ ? "bg-yellow-500 text-white"
40
+ : project . match_percentage >= 50
41
+ ? "bg-yellow-400 text-white"
42
+ : project . match_percentage >= 40
43
+ ? "bg-orange-600 text-white"
44
+ : project . match_percentage >= 30
45
+ ? "bg-orange-500 text-white"
46
+ : project . match_percentage >= 20
47
+ ? "bg-red-600 text-white"
48
+ : "bg-red-700 text-white"
39
49
} `}
40
50
>
41
- { project . matchPercentage } % Match
51
+ { project . match_percentage } % Match
42
52
</ div >
43
53
44
54
{ /* Image */ }
45
55
< div className = "bg-gray-200 h-48 flex items-center justify-center text-gray-500 text-sm" >
46
- { project . imageUrl ? (
56
+ { project . image_url ? (
47
57
< img
48
- src = { project . imageUrl }
58
+ src = { project . image_url }
49
59
alt = { `${ project . title } Cover` }
50
60
className = "w-full h-full object-cover"
51
61
/>
@@ -108,7 +118,7 @@ export default function ProjectCardLarge({ project, highlighted = false }) {
108
118
ProjectCardLarge . propTypes = {
109
119
project : PropTypes . shape ( {
110
120
group : PropTypes . string . isRequired ,
111
- matchPercentage : PropTypes . number . isRequired ,
121
+ match_percentage : PropTypes . number . isRequired ,
112
122
title : PropTypes . string . isRequired ,
113
123
institution : PropTypes . string . isRequired ,
114
124
description : PropTypes . string . isRequired ,
@@ -119,7 +129,7 @@ ProjectCardLarge.propTypes = {
119
129
title : PropTypes . string . isRequired ,
120
130
} )
121
131
) . isRequired ,
122
- imageUrl : PropTypes . string ,
132
+ image_url : PropTypes . string ,
123
133
} ) . isRequired ,
124
134
highlighted : PropTypes . bool ,
125
135
} ;
0 commit comments