Removing the forceRefresh from the router (#732)

* Removing the forceRefresh from the router

* Fix eslint
This commit is contained in:
Jesús Espino 2021-07-16 12:46:27 +02:00 committed by GitHub
parent b2346fcacf
commit e988812ccb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 5 deletions

View file

@ -49,10 +49,7 @@ const App = React.memo((): JSX.Element => {
>
<DndProvider backend={Utils.isMobile() ? TouchBackend : HTML5Backend}>
<FlashMessages milliseconds={2000}/>
<Router
forceRefresh={true}
basename={Utils.getBaseURL()}
>
<Router basename={Utils.getBaseURL()}>
<div id='frame'>
<div id='main'>
<Switch>

View file

@ -138,7 +138,11 @@ class OctoListener {
this.blockIds = []
this.onChange = undefined
this.isInitialized = false
ws.close()
try {
ws?.close()
} catch {
Utils.log('OctoListener unable to close the websocket')
}
}
private authenticate(workspaceId: string): void {

View file

@ -81,6 +81,15 @@ class BoardPage extends React.Component<Props, State> {
const board = this.state.boardTree?.board
const prevBoard = prevState.boardTree?.board
const boardId = this.props.match.params.boardId
const prevBoardId = prevProps.match.params.boardId
const viewId = this.props.match.params.viewId
const prevViewId = prevProps.match.params.viewId
if (boardId && (boardId !== prevBoardId || viewId !== prevViewId)) {
this.attachToBoard(boardId, viewId)
}
const activeView = this.state.boardTree?.activeView
const prevActiveView = prevState.boardTree?.activeView