Move app history replace to happen only if not in plugin legacy mode (#1466)

This commit is contained in:
Miguel de la Cruz 2021-10-06 17:55:19 +02:00 committed by GitHub
parent d0dd6ad31a
commit ee3f00858a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -93,11 +93,14 @@ const App = React.memo((): JSX.Element => {
dispatch(fetchLanguage()) dispatch(fetchLanguage())
dispatch(fetchMe()) dispatch(fetchMe())
dispatch(fetchClientConfig()) dispatch(fetchClientConfig())
if (Utils.isFocalboardPlugin()) {
history.replace(window.location.pathname.replace((window as any).frontendBaseURL, ''))
}
}, []) }, [])
if (Utils.isFocalboardPlugin()) {
useEffect(() => {
history.replace(window.location.pathname.replace((window as any).frontendBaseURL, ''))
}, [])
}
if (!inPluginLegacy) { if (!inPluginLegacy) {
useEffect(() => { useEffect(() => {
wsClient.open() wsClient.open()