From d30e059ffca34dda91efa6892e7edf0cad7aafea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuno=20G=C3=B3is?= Date: Thu, 12 Oct 2023 15:07:55 +0100 Subject: [PATCH] fix: message banner internal link assumption (#5011) https://linear.app/unleash/issue/2-1504/fix-message-banner-internal-link-assumption Fixes the internal link assumption in message banner to `.startsWith('/')` - Any other links will be treated as external (normal `href`). --- .../component/messageBanners/MessageBanner/MessageBanner.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/component/messageBanners/MessageBanner/MessageBanner.tsx b/frontend/src/component/messageBanners/MessageBanner/MessageBanner.tsx index 62dc412dca..517be3982e 100644 --- a/frontend/src/component/messageBanners/MessageBanner/MessageBanner.tsx +++ b/frontend/src/component/messageBanners/MessageBanner/MessageBanner.tsx @@ -139,7 +139,7 @@ const BannerButton = ({ if (!link) return null; const dialog = link === 'dialog'; - const internal = !link.startsWith('http'); + const internal = link.startsWith('/'); const trackEvent = () => { if (!plausibleEvent) return;