Skip to content

Commit 76d7db7

Browse files
committed
fix: added missing description to ProblemNode
1 parent 6a43c72 commit 76d7db7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/components/solvers/Graph/ProblemNode.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,9 @@ export function ProblemNode(props: NodeProps<ProblemNodeData>) {
133133
// Type id is the same for all problems
134134
const typeId = props.data.problemDtos[0].typeId;
135135
const solverId = props.data.problemDtos[0].solverId;
136-
const solverName = solvers[typeId]?.find((s) => s.id === solverId)?.name;
136+
const solver = solvers[typeId]?.find((s) => s.id === solverId);
137+
const solverName = solver?.name;
138+
const solverDescription = solver?.description ?? "Solves the Problem.";
137139

138140
// Fetch solvers for type if necessary
139141
getSolvers(typeId);
@@ -342,6 +344,7 @@ export function ProblemNode(props: NodeProps<ProblemNodeData>) {
342344
solver={{
343345
id: solverId,
344346
name: solverName,
347+
description: solverDescription,
345348
}}
346349
button={problemButton()}
347350
/>

0 commit comments

Comments
 (0)