chore: upgrade prettier and fix linting errors

This commit is contained in:
Björn Dalfors
2024-03-07 14:34:12 +01:00
parent d1de0770f2
commit f25cab4682
36 changed files with 644 additions and 388 deletions

View File

@@ -91,23 +91,26 @@ class TreeComponent extends React.PureComponent<Props, State> {
const updateInterval = Math.max(expectedRenderTime * 7, 300)
const timeUntilNextUpdate = updateInterval - (performance.now() - this.renderTime)
this.updateTimer = setTimeout(() => {
window.requestIdleCallback(
() => {
this.updateTimer && clearTimeout(this.updateTimer)
this.updateTimer = undefined
this.renderTime = performance.now()
this.updateTimer = setTimeout(
() => {
window.requestIdleCallback(
() => {
this.updateTimer && clearTimeout(this.updateTimer)
this.updateTimer = undefined
this.renderTime = performance.now()
window.requestIdleCallback(
() => {
this.setState({ lastUpdate: this.renderTime })
},
{ timeout: 100 }
)
},
{ timeout: 500 }
)
}, Math.max(0, timeUntilNextUpdate))
window.requestIdleCallback(
() => {
this.setState({ lastUpdate: this.renderTime })
},
{ timeout: 100 }
)
},
{ timeout: 500 }
)
},
Math.max(0, timeUntilNextUpdate)
)
}
public componentWillUpdate() {