Skip to content

Commit

Permalink
🐛 Fix getIconByRisk in answer-table.tsx
Browse files Browse the repository at this point in the history
While working on upgrading eslint, 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 25, 2023
1 parent 36fdf4d commit 2e78cf4
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 2e78cf4

Please sign in to comment.