Skip to content

Commit 94ddfed

Browse files
committed
Fix the color coding for complexity
1 parent be5bba8 commit 94ddfed

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

apps/question-service/src/app/page.tsx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -192,14 +192,18 @@ export default function Home() {
192192
key: "complexity",
193193
render: (difficulty: string) => {
194194
let color = "";
195-
if (difficulty === "Easy") {
195+
if (difficulty === "easy") {
196196
color = "#2DB55D";
197-
} else if (difficulty === "Medium") {
197+
} else if (difficulty === "medium") {
198198
color = "orange";
199-
} else if (difficulty === "Hard") {
199+
} else if (difficulty === "hard") {
200200
color = "red";
201201
}
202-
return <div style={{ color }}>{difficulty}</div>;
202+
return (
203+
<div style={{ color }}>
204+
{difficulty.charAt(0).toUpperCase() + difficulty.slice(1)}
205+
</div>
206+
);
203207
},
204208
},
205209
{

0 commit comments

Comments
 (0)