Removing the forceRefresh from the router (#732)
* Removing the forceRefresh from the router * Fix eslint
This commit is contained in:
parent
b2346fcacf
commit
e988812ccb
3 changed files with 15 additions and 5 deletions
|
@ -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>
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue