Skip to content

Commit

Permalink
🐛 Fix getIconByRisk in answer-table.tsx (#1316)
Browse files Browse the repository at this point in the history
While working on upgrading eslint (PR #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 <sdickers@redhat.com>
  • Loading branch information
sjd78 committed Aug 28, 2023
1 parent ea99f09 commit 5d784c8
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 5d784c8

Please sign in to comment.