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 <[email protected]>
  • Loading branch information
sjd78 committed Aug 27, 2023
1 parent ea99f09 commit d5efffc
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 d5efffc

Please sign in to comment.