16070: Replace process command dialog with command card
[arvados-workbench2.git] / src / components / code-snippet / code-snippet.tsx
index fd6f7fc3db73327aa479f0f5b65b4be70d921d70..f156e3e8e6e7ad26258662617f6ce3aafd60b960 100644 (file)
@@ -2,7 +2,7 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import * as React from 'react';
+import React from 'react';
 import { StyleRulesCallback, WithStyles, Typography, withStyles } from '@material-ui/core';
 import { ArvadosTheme } from 'common/custom-theme';
 import classNames from 'classnames';
@@ -33,10 +33,8 @@ export const CodeSnippet = withStyles(styles)(
         <Typography
         component="div"
         className={classNames(classes.root, className)}>
-            {
-                lines.map((line: string, index: number) => {
-                    return <Typography key={index} className={apiResponse ? classes.space : className} component="pre">{line}</Typography>;
-                })
-            }
+            <Typography className={apiResponse ? classes.space : className} component="pre">
+                {lines.join('\n')}
+            </Typography>
         </Typography>
-    );
\ No newline at end of file
+    );