diff --git a/maubot/management/frontend/src/pages/dashboard/index.js b/maubot/management/frontend/src/pages/dashboard/index.js index c042fe8..a688ff5 100644 --- a/maubot/management/frontend/src/pages/dashboard/index.js +++ b/maubot/management/frontend/src/pages/dashboard/index.js @@ -33,7 +33,7 @@ class Dashboard extends Component { plugins: {}, sidebarOpen: false, modalOpen: false, - logFocus: "", + logFocus: null, } this.logLines = [] this.logMap = {} @@ -126,16 +126,18 @@ class Dashboard extends Component { entry, onDelete: () => this.delete(field, id), onChange: newEntry => this.add(field, newEntry, id), - openLog: filter => { - this.setState({ - logFocus: filter, - }) - this.logModal.open() - }, + openLog: this.openLog, ctx: this.state, }) } + openLog = filter => { + this.setState({ + logFocus: typeof filter === "string" ? filter : null, + }) + this.logModal.open() + } + renderNotFound = (thing = "path") => (