Fixes for SidebarSubmenuItem to use external links

Signed-off-by: Jonathan Ash <jonathan-ash@users.noreply.github.com>
This commit is contained in:
Jonathan Ash
2022-02-24 09:07:07 +00:00
parent c794118cb7
commit e01cc158c7
2 changed files with 2 additions and 2 deletions
@@ -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<BackstageTheme>(theme => ({
@@ -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);