Skip to content

Commit

Permalink
remove the double scrollbars
Browse files Browse the repository at this point in the history
  • Loading branch information
jdrews committed Aug 26, 2022
1 parent b89c8dd commit b6b6d7d
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions web/src/LogViewer.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/** @jsxImportSource @emotion/react */

import React, {useEffect} from 'react';
import React from 'react';
import './LogViewer.css';
import {
List,
Expand Down Expand Up @@ -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 (
<Container disableGutters maxWidth="false" sx={{width: '100%'}}>
<Container disableGutters maxWidth="false" sx={{width: '100%', height: '100vh'}}>
<ThemeProvider theme={this.theme}>
<SetTheme setTheme={this.setTheme}/>
<Box sx={{borderBottom: 1, borderColor: 'divider'}}>
<Box sx={{borderBottom: 1, borderColor: 'divider', height: '8vh', m: 0, p: 0}}>
<Tabs aria-label="log selector bar" textColor="secondary" indicatorColor="secondary">
{/*<Tabs value={value} onChange={handleChange} aria-label="basic tabs example">*/
/*TODO: use value and onChange to populate tabs dynamically and make them do stuff*/}
Expand All @@ -156,8 +156,7 @@ export default class LogViewer extends React.Component {
sx={{color: '#ffffff', background: '#222', textTransform: 'unset'}}/>
</Tabs>
</Box>
<Box sx={{width: '100%'}}>
<div className="LogViewer">
<Box sx={{width: '100%', height: '92vh', m: 0, p: 0}} className="LogViewer">
<AutoSizer disableWidth>
{({height}) => (
<List
Expand All @@ -182,7 +181,6 @@ export default class LogViewer extends React.Component {
/>
)}
</AutoSizer>
</div>
</Box>
</ThemeProvider>
</Container>
Expand All @@ -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.
Expand Down Expand Up @@ -230,7 +228,7 @@ const SetTheme = ({ setTheme }) => {
React.useEffect(() => {
setTheme(theme)
return () => null
},[])
})

return null
}

0 comments on commit b6b6d7d

Please sign in to comment.