1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00

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`).
This commit is contained in:
Nuno Góis 2023-10-12 15:07:55 +01:00 committed by GitHub
parent f34d187cd9
commit d30e059ffc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;