From 0eb3bbc0dcc669f9e75458e75912ba56a4a9d73e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20Espino?= Date: Mon, 25 Jul 2022 20:54:40 +0200 Subject: [PATCH] Openning the board in a new window from the RHS in channels (#3416) --- .../webapp/src/components/rhsChannelBoardItem.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mattermost-plugin/webapp/src/components/rhsChannelBoardItem.tsx b/mattermost-plugin/webapp/src/components/rhsChannelBoardItem.tsx index ba1a58c70..542fe3a38 100644 --- a/mattermost-plugin/webapp/src/components/rhsChannelBoardItem.tsx +++ b/mattermost-plugin/webapp/src/components/rhsChannelBoardItem.tsx @@ -13,9 +13,12 @@ import OptionsIcon from '../../../../webapp/src/widgets/icons/options' import DeleteIcon from '../../../../webapp/src/widgets/icons/delete' import Menu from '../../../../webapp/src/widgets/menu' import MenuWrapper from '../../../../webapp/src/widgets/menuWrapper' +import {SuiteWindow} from '../../../../webapp/src/types/index' import './rhsChannelBoardItem.scss' +const windowAny = (window as SuiteWindow) + type Props = { board: Board } @@ -30,8 +33,7 @@ const RHSChannelBoardItem = (props: Props) => { } const handleBoardClicked = (boardID: string) => { - const windowAny: any = window - windowAny.WebappUtils.browserHistory.push(`/boards/team/${team.id}/${boardID}`) + window.open(`${windowAny.frontendBaseURL}/team/${team.id}/${boardID}`, '_blank', 'noopener') } const onUnlinkBoard = async (board: Board) => {