From 82ca6510746c1973151aea4cee78a6661969de9a Mon Sep 17 00:00:00 2001 From: Harshil Sharma Date: Fri, 1 Oct 2021 15:41:30 +0530 Subject: [PATCH 1/2] Resolved issue regarding openign boards link from channels --- webapp/src/app.tsx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/webapp/src/app.tsx b/webapp/src/app.tsx index bac75828eb6..9e2f9b31c72 100644 --- a/webapp/src/app.tsx +++ b/webapp/src/app.tsx @@ -51,7 +51,9 @@ if (Utils.isDesktop() && Utils.isFocalboardPlugin()) { return } - history.replace(pathName.replace((window as any).frontendBaseURL, '')) + if (Utils.isFocalboardPlugin()) { + history.replace(pathName.replace((window as any).frontendBaseURL, '')) + } }) } @@ -85,6 +87,7 @@ const App = React.memo((): JSX.Element => { dispatch(fetchLanguage()) dispatch(fetchMe()) dispatch(fetchClientConfig()) + history.replace(window.location.pathname.replace((window as any).frontendBaseURL, '')) }, []) useEffect(() => { @@ -106,8 +109,8 @@ const App = React.memo((): JSX.Element => { setTimeout(() => dispatch(setGlobalError('')), 0) } - const continueToWelcomeScreen = (boardIdIsValidUUIDV4 = true) => { - return Utils.isFocalboardPlugin() && loggedIn === true && (!UserSettings.welcomePageViewed || !boardIdIsValidUUIDV4) + const continueToWelcomeScreen = () => { + return Utils.isFocalboardPlugin() && loggedIn === true && !UserSettings.welcomePageViewed } const buildOriginalPath = (workspaceId = '', boardId = '', viewId = '', cardId = '') => { @@ -231,7 +234,7 @@ const App = React.memo((): JSX.Element => { return } - if (continueToWelcomeScreen(boardIdIsValidUUIDV4)) { + if (continueToWelcomeScreen()) { const originalPath = `/${buildOriginalPath('', boardId, viewId, cardId)}` const queryString = boardIdIsValidUUIDV4 ? `r=${originalPath}` : '' return From 70419b67a59a3a430ab53ef60d48f87c810bb104 Mon Sep 17 00:00:00 2001 From: Harshil Sharma Date: Fri, 1 Oct 2021 16:57:31 +0530 Subject: [PATCH 2/2] Removed unnecessary check --- webapp/src/app.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/webapp/src/app.tsx b/webapp/src/app.tsx index 9e2f9b31c72..0ff03ad5b3f 100644 --- a/webapp/src/app.tsx +++ b/webapp/src/app.tsx @@ -51,9 +51,7 @@ if (Utils.isDesktop() && Utils.isFocalboardPlugin()) { return } - if (Utils.isFocalboardPlugin()) { - history.replace(pathName.replace((window as any).frontendBaseURL, '')) - } + history.replace(pathName.replace((window as any).frontendBaseURL, '')) }) }