Skip to content

Commit

Permalink
fix: add helper text to press play button when no results
Browse files Browse the repository at this point in the history
  • Loading branch information
shanejonas committed Mar 6, 2020
1 parent 6e67d51 commit 170c34d
Showing 1 changed file with 23 additions and 17 deletions.
40 changes: 23 additions & 17 deletions src/containers/Inspector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import PlayCircle from "@material-ui/icons/PlayCircleFilled";
import CloseIcon from "@material-ui/icons/Close";
import PlusIcon from "@material-ui/icons/Add";
import CheckCircle from "@material-ui/icons/CheckCircle";
import { IconButton, AppBar, Toolbar, Typography, Button, InputBase, Tab, Tabs, Tooltip } from "@material-ui/core";
import { IconButton, AppBar, Toolbar, Typography, Button, InputBase, Tab, Tabs, Tooltip, Grid } from "@material-ui/core";
import { Client, RequestManager, HTTPTransport, WebSocketTransport } from "@open-rpc/client-js";
import Brightness3Icon from "@material-ui/icons/Brightness3";
import WbSunnyIcon from "@material-ui/icons/WbSunny";
Expand Down Expand Up @@ -358,22 +358,28 @@ const Inspector: React.FC<IProps> = (props) => {
Clear
</Button>
}
<MonacoEditor
options={{
minimap: {
enabled: false,
},
wordWrap: "on",
lineNumbers: "off",
wrappingIndent: "deepIndent",
readOnly: true,
showFoldingControls: "always",
}}
height="93vh"
editorDidMount={handleResponseEditorDidMount}
language="json"
value={JSON.stringify(errorToJSON(error) || results, null, 4) || ""}
/>
{results
?
<MonacoEditor
options={{
minimap: {
enabled: false,
},
wordWrap: "on",
lineNumbers: "off",
wrappingIndent: "deepIndent",
readOnly: true,
showFoldingControls: "always",
}}
height="93vh"
editorDidMount={handleResponseEditorDidMount}
language="json"
value={JSON.stringify(errorToJSON(error) || results, null, 4) || ""}
/>
: <Grid container justify="center" style={{paddingTop: "20px"}}>
<Typography variant="caption">Press the Play button to see the results here.</Typography>
</Grid>
}
</>
</SplitPane>
</>
Expand Down

0 comments on commit 170c34d

Please sign in to comment.