diff --git a/web/src/LogViewer.js b/web/src/LogViewer.js index 68a1957..35fea6a 100644 --- a/web/src/LogViewer.js +++ b/web/src/LogViewer.js @@ -1,6 +1,6 @@ /** @jsxImportSource @emotion/react */ -import React, {useEffect} from 'react'; +import React from 'react'; import './LogViewer.css'; import { List, @@ -135,10 +135,10 @@ export default class LogViewer extends React.Component { // Might be able to have this react class be instantiated within a larger react class that handles the file tabs and switching render() { return ( - + - + {/**/ /*TODO: use value and onChange to populate tabs dynamically and make them do stuff*/} @@ -156,8 +156,7 @@ export default class LogViewer extends React.Component { sx={{color: '#ffffff', background: '#222', textTransform: 'unset'}}/> - -
+ {({height}) => ( )} -
@@ -196,7 +194,7 @@ export default class LogViewer extends React.Component { fetch(url + "/settings/logstation-name") .then(response => response.json()) .then(data => { - this.state.title=data.name + this.setState({title: data.name}) document.title = this.state.title }); // Commenting this out for now since line coloring is now happening on the server side. @@ -230,7 +228,7 @@ const SetTheme = ({ setTheme }) => { React.useEffect(() => { setTheme(theme) return () => null - },[]) + }) return null } \ No newline at end of file