Skip to content

Commit

Permalink
fix: added missing description to ProblemNode
Browse files Browse the repository at this point in the history
  • Loading branch information
zaibod committed Jan 2, 2025
1 parent 6a43c72 commit 76d7db7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/solvers/Graph/ProblemNode.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,9 @@ export function ProblemNode(props: NodeProps<ProblemNodeData>) {
// Type id is the same for all problems
const typeId = props.data.problemDtos[0].typeId;
const solverId = props.data.problemDtos[0].solverId;
const solverName = solvers[typeId]?.find((s) => s.id === solverId)?.name;
const solver = solvers[typeId]?.find((s) => s.id === solverId);
const solverName = solver?.name;
const solverDescription = solver?.description ?? "Solves the Problem.";

// Fetch solvers for type if necessary
getSolvers(typeId);
Expand Down Expand Up @@ -342,6 +344,7 @@ export function ProblemNode(props: NodeProps<ProblemNodeData>) {
solver={{
id: solverId,
name: solverName,
description: solverDescription,
}}
button={problemButton()}
/>
Expand Down

0 comments on commit 76d7db7

Please sign in to comment.