Skip to content

Commit 5d784c8

Browse files
authored
🐛 Fix getIconByRisk in answer-table.tsx (#1316)
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 <[email protected]>
1 parent ea99f09 commit 5d784c8

File tree

1 file changed

+1
-1
lines changed
  • client/src/app/pages/assessment-management/questionnaire/components

1 file changed

+1
-1
lines changed

client/src/app/pages/assessment-management/questionnaire/components/answer-table.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ const AnswerTable: React.FC<IAnswerTableProps> = ({ answers }) => {
4444
case "green":
4545
return <IconedStatus preset="Ok" />;
4646
case "red":
47-
<IconedStatus icon={<TimesCircleIcon />} status="danger" />;
47+
return <IconedStatus icon={<TimesCircleIcon />} status="danger" />;
4848
case "yellow":
4949
return <IconedStatus icon={<WarningTriangleIcon />} status="warning" />;
5050
default:

0 commit comments

Comments
 (0)