2
0
mirror of https://github.com/hibiken/asynqmon.git synced 2025-10-26 16:26:12 +08:00

Create wrapper component for sytanx-highlighter component

This commit is contained in:
Ken Hibino
2021-01-15 12:50:54 -08:00
parent 3778dacca7
commit ad0185e96a
10 changed files with 44 additions and 45 deletions

View File

@@ -22,8 +22,7 @@ import MoreHorizIcon from "@material-ui/icons/MoreHoriz";
import KeyboardArrowUpIcon from "@material-ui/icons/KeyboardArrowUp";
import KeyboardArrowDownIcon from "@material-ui/icons/KeyboardArrowDown";
import Typography from "@material-ui/core/Typography";
import SyntaxHighlighter from "react-syntax-highlighter";
import syntaxHighlightStyle from "react-syntax-highlighter/dist/esm/styles/hljs/github";
import SyntaxHighlighter from "./SyntaxHighlighter";
import {
listActiveTasksAsync,
cancelActiveTaskAsync,
@@ -326,7 +325,7 @@ function Row(props: RowProps) {
<Typography variant="h6" gutterBottom component="div">
Payload
</Typography>
<SyntaxHighlighter language="json" style={syntaxHighlightStyle}>
<SyntaxHighlighter language="json">
{JSON.stringify(task.payload, null, 2)}
</SyntaxHighlighter>
</Box>