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}>
|
<DndProvider backend={Utils.isMobile() ? TouchBackend : HTML5Backend}>
|
||||||
<FlashMessages milliseconds={2000}/>
|
<FlashMessages milliseconds={2000}/>
|
||||||
<Router
|
<Router basename={Utils.getBaseURL()}>
|
||||||
forceRefresh={true}
|
|
||||||
basename={Utils.getBaseURL()}
|
|
||||||
>
|
|
||||||
<div id='frame'>
|
<div id='frame'>
|
||||||
<div id='main'>
|
<div id='main'>
|
||||||
<Switch>
|
<Switch>
|
||||||
|
|
|
@ -138,7 +138,11 @@ class OctoListener {
|
||||||
this.blockIds = []
|
this.blockIds = []
|
||||||
this.onChange = undefined
|
this.onChange = undefined
|
||||||
this.isInitialized = false
|
this.isInitialized = false
|
||||||
ws.close()
|
try {
|
||||||
|
ws?.close()
|
||||||
|
} catch {
|
||||||
|
Utils.log('OctoListener unable to close the websocket')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private authenticate(workspaceId: string): void {
|
private authenticate(workspaceId: string): void {
|
||||||
|
|
|
@ -81,6 +81,15 @@ class BoardPage extends React.Component<Props, State> {
|
||||||
const board = this.state.boardTree?.board
|
const board = this.state.boardTree?.board
|
||||||
const prevBoard = prevState.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 activeView = this.state.boardTree?.activeView
|
||||||
const prevActiveView = prevState.boardTree?.activeView
|
const prevActiveView = prevState.boardTree?.activeView
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue