Skip to content

Commit

Permalink
🐛 Fix getIconByRisk in answer-table.tsx (konveyor#1316)
Browse files Browse the repository at this point in the history
While working on upgrading eslint (PR konveyor#1291), a switch/case
`no-fallthrough` error was found in the `getIconByRisk` function in the
`AnswerTable` component. This error would cause a risk of "red" to
actually render as a risk of "yellow". Fixing it separately from the
eslint upgrade seems like a good thing.

Signed-off-by: Scott J Dickerson <[email protected]>
  • Loading branch information
sjd78 authored and ibolton336 committed Aug 29, 2023
1 parent ecc79b2 commit 8ef66b5
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const AnswerTable: React.FC<IAnswerTableProps> = ({ answers }) => {
case "green":
return <IconedStatus preset="Ok" />;
case "red":
<IconedStatus icon={<TimesCircleIcon />} status="danger" />;
return <IconedStatus icon={<TimesCircleIcon />} status="danger" />;
case "yellow":
return <IconedStatus icon={<WarningTriangleIcon />} status="warning" />;
default:
Expand Down

0 comments on commit 8ef66b5

Please sign in to comment.