add review suggestion

Signed-off-by: nikolar <reyna.nikolayev@autodesk.com>
This commit is contained in:
nikolar
2024-02-28 09:59:13 -08:00
parent e150fe7e19
commit 83e7ec6322
2 changed files with 7 additions and 7 deletions
-2
View File
@@ -2,6 +2,4 @@
'@backstage/plugin-entity-feedback': patch
---
<!-- @backstage/plugin-entity-feedback -->
Remove empty Chip in `FeedbackResponseTable.tsx` when there is no response, and fix typo in Feedback Dialog Box.
@@ -80,11 +80,13 @@ export const FeedbackResponseTable = (props: FeedbackResponseTableProps) => {
width: '35%',
render: (response: ResponseRow) => (
<>
{response?.response &&
response.response.length > 0 &&
response.response
?.split(',')
.map(res => <Chip key={res} size="small" label={res} />)}
{(response.response || '')
.split(',')
.map(v => v.trim()) // removes whitespace
.filter(Boolean) // removes accidental empty entries
.map(res => (
<Chip key={res} size="small" label={res} />
))}
</>
),
},