From e01cc158c7ddb397f90c7274b3740d4696e12668 Mon Sep 17 00:00:00 2001 From: Jonathan Ash Date: Thu, 24 Feb 2022 09:07:07 +0000 Subject: [PATCH] Fixes for SidebarSubmenuItem to use external links Signed-off-by: Jonathan Ash --- .../core-components/src/layout/Sidebar/SidebarSubmenuItem.tsx | 2 +- packages/core-components/src/layout/Sidebar/utils.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/core-components/src/layout/Sidebar/SidebarSubmenuItem.tsx b/packages/core-components/src/layout/Sidebar/SidebarSubmenuItem.tsx index 1d697ead14..a0ecc75918 100644 --- a/packages/core-components/src/layout/Sidebar/SidebarSubmenuItem.tsx +++ b/packages/core-components/src/layout/Sidebar/SidebarSubmenuItem.tsx @@ -30,7 +30,7 @@ import ArrowDropDownIcon from '@material-ui/icons/ArrowDropDown'; import ArrowDropUpIcon from '@material-ui/icons/ArrowDropUp'; import { SidebarItemWithSubmenuContext } from './config'; import { isLocationMatch } from './utils'; -import { Link as BackstageLink } from '../../'; +import { Link as BackstageLink } from '../../components/Link'; import { isExternalLink } from './utils'; const useStyles = makeStyles(theme => ({ diff --git a/packages/core-components/src/layout/Sidebar/utils.ts b/packages/core-components/src/layout/Sidebar/utils.ts index 7c85110aca..0c586ee3b3 100644 --- a/packages/core-components/src/layout/Sidebar/utils.ts +++ b/packages/core-components/src/layout/Sidebar/utils.ts @@ -34,4 +34,4 @@ export function isLocationMatch(currentLocation: Location, toLocation: Path) { return matching; } -export const isExternalLink = (link: string) => /^http/.test(link); +export const isExternalLink = (link: string) => /^https?:/.test(link);