diff --git a/src/app/(app)/problemset/page.tsx b/src/app/(app)/problemset/page.tsx index 0317998..93d8de9 100644 --- a/src/app/(app)/problemset/page.tsx +++ b/src/app/(app)/problemset/page.tsx @@ -8,6 +8,20 @@ import { TableRow, } from "@/components/ui/table"; import prisma from "@/lib/prisma"; +import { Difficulty } from "@prisma/client"; + +const getDifficultyColor = (difficulty: Difficulty) => { + switch (difficulty) { + case "EASY": + return "text-green-500"; + case "MEDIUM": + return "text-yellow-500"; + case "HARD": + return "text-red-500"; + default: + return "text-gray-500"; + } +}; export default async function ProblemsetPage() { const problems = await prisma.problem.findMany({ @@ -46,7 +60,9 @@ export default async function ProblemsetPage() { {problem.title} - + {problem.difficulty}