Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Resolved issue regarding openign boards link from channels #1388

Merged
merged 2 commits into from
Oct 4, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions webapp/src/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ const App = React.memo((): JSX.Element => {
dispatch(fetchLanguage())
dispatch(fetchMe())
dispatch(fetchClientConfig())
history.replace(window.location.pathname.replace((window as any).frontendBaseURL, ''))
}, [])

useEffect(() => {
Expand All @@ -106,8 +107,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 = '') => {
Expand Down Expand Up @@ -231,7 +232,7 @@ const App = React.memo((): JSX.Element => {
return <Redirect to='/#'/>
}

if (continueToWelcomeScreen(boardIdIsValidUUIDV4)) {
if (continueToWelcomeScreen()) {
const originalPath = `/${buildOriginalPath('', boardId, viewId, cardId)}`
const queryString = boardIdIsValidUUIDV4 ? `r=${originalPath}` : ''
return <Redirect to={`/welcome?${queryString}`}/>
Expand Down