diff --git a/apps/site/components/Link.tsx b/apps/site/components/Link.tsx index 72ececf586631..b7d32ff911acd 100644 --- a/apps/site/components/Link.tsx +++ b/apps/site/components/Link.tsx @@ -7,7 +7,7 @@ const Link: FC> = ({ href, ...props }) => { - if (!href || href.toString().startsWith('http')) { + if (!href || /^https?:/.test(href.toString())) { return ( {children} diff --git a/packages/ui-components/Containers/Sidebar/SidebarItem/index.tsx b/packages/ui-components/Containers/Sidebar/SidebarItem/index.tsx index bcf429dc64026..0556c11c0d156 100644 --- a/packages/ui-components/Containers/Sidebar/SidebarItem/index.tsx +++ b/packages/ui-components/Containers/Sidebar/SidebarItem/index.tsx @@ -36,7 +36,7 @@ const SidebarItem: FC = ({ )} {label} - {link.startsWith('http') && } + {/^https?:/.test(link) && } );