working Problems

This commit is contained in:
2026-02-07 16:08:22 +01:00
parent 969500f5a4
commit 4e92010bfe
6 changed files with 102 additions and 125 deletions
+3 -1
View File
@@ -14,6 +14,8 @@ import { getProblems } from "@/modules/problems/actions";
export default function Problems() {
const [problems, problemsLoaded, problemsError] = useAction(getProblems);
console.log(problems);
const [viewMode, setViewMode] = useState<"grid" | "list">("grid");
const difficulties = ["All", "Easy", "Medium", "Hard"];
@@ -84,7 +86,7 @@ export default function Problems() {
>
{problems &&
problems.map((problem, i) => (
<ProblemCard key={problem.name} {...problem} index={i} />
<ProblemCard key={problem.title} index={i} problem={problem} />
))}
</div>
</div>