Skip to content

Commit def8168

Browse files
authored
fix(webapp): Better package listing (#210)
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
1 parent 03f4146 commit def8168

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

docs/webapp.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -191,12 +191,13 @@ function MyThemeProvider(props) {
191191
class App extends React.Component {
192192
constructor(props) {
193193
super(props);
194-
const deps_str = props.deps.join(" ");
194+
const inner_deps_str = props.deps.join("\n");
195+
const deps_str = `<pre><code>${inner_deps_str}</code></pre>`;
195196
this.state = {
196197
results: [],
197198
repo: urlParams.get("repo") || "",
198199
branch: urlParams.get("branch") || "",
199-
msg: `${DEFAULT_MSG} Packages: ${deps_str}`,
200+
msg: `<p>${DEFAULT_MSG}</p><h4>Packages:</h4> ${deps_str}`,
200201
progress: false,
201202
err_msg: "",
202203
url: "",
@@ -362,7 +363,7 @@ class App extends React.Component {
362363
<MaterialUI.Paper elevation={3}>
363364
<MaterialUI.Box sx={{ p: 2 }}>
364365
<MaterialUI.Typography variant="body1" component="div">
365-
{this.state.msg}
366+
<span dangerouslySetInnerHTML={{ __html: this.state.msg }} />
366367
</MaterialUI.Typography>
367368
{this.state.progress && <MaterialUI.LinearProgress />}
368369
{this.state.err_msg && (

0 commit comments

Comments
 (0)