Skip to content

Commit 5c5e658

Browse files
committed
apply suggestions from PR
1 parent 5ada143 commit 5c5e658

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

site/src/pages/HealthPage/WorkspaceProxyPage.tsx

+4-7
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ export const WorkspaceProxyPage = () => {
3939
</Header>
4040

4141
<Main>
42-
{workspace_proxy.error ? (
42+
{workspace_proxy.error && (
4343
<Alert severity="error">{workspace_proxy.error}</Alert>
44-
) : null}
44+
)}
4545
{workspace_proxy.warnings.map((warning) => {
4646
return (
4747
<Alert key={warning.code} severity="warning">
@@ -146,11 +146,8 @@ export const WorkspaceProxyPage = () => {
146146
<span>OK</span>
147147
) : (
148148
<div css={{ display: "flex", flexDirection: "column" }}>
149-
{errors.map((error, i) => (
150-
<span key={i}>{error}</span>
151-
))}
152-
{warnings.map((warning, i) => (
153-
<span key={i}>{warning}</span>
149+
{[...errors, ...warnings].map((msg, i) => (
150+
<span key={i}>{msg}</span>
154151
))}
155152
</div>
156153
)}

0 commit comments

Comments
 (0)