Skip to content

Commit

Permalink
Set initial bottom/topbar height in AppInitComponent constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
manisandro committed Jul 23, 2024
1 parent f5417b4 commit 0809c01
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions components/StandardApp.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ class AppInitComponent extends React.Component {
constructor(props) {
super(props);
this.initialized = false;

// Set initial bottom/topbar height to zero, the components will set the proper height when initialized
props.setTopbarHeight(0);
props.setBottombarHeight(0);
}
componentDidMount() {
this.componentDidUpdate();
Expand All @@ -91,10 +95,6 @@ class AppInitComponent extends React.Component {
const colorScheme = this.props.initialParams.style || storedColorScheme || ConfigUtils.getConfigProp("defaultColorScheme");
this.props.setColorScheme(colorScheme);

// Set initial bottom/topbar height to zero, the components will set the proper height when initialized
this.props.setTopbarHeight(0);
this.props.setBottombarHeight(0);

// Load themes.json
axios.get("themes.json").then(response => {
const themes = response.data.themes || {};
Expand Down

0 comments on commit 0809c01

Please sign in to comment.