diff --git a/src/components/Button.astro b/src/components/Button.astro index 10ac7a2..463989a 100644 --- a/src/components/Button.astro +++ b/src/components/Button.astro @@ -1,6 +1,6 @@ --- const { link, style } = Astro.props; -const url = `${import.meta.env.BASE_URL}${link}`; +const url = link.startsWith('https') ? link : `${import.meta.env.BASE_URL}${link}`; --- diff --git a/src/components/Link.astro b/src/components/Link.astro index 49159b8..20c5ac7 100644 --- a/src/components/Link.astro +++ b/src/components/Link.astro @@ -1,7 +1,7 @@ --- const { href, style, noUnderline } = Astro.props; const classList = `${style} ${noUnderline === 'true' ? 'no-link-underline' : ''}`; -const url = `${import.meta.env.BASE_URL}${href}`; +const url = href.startsWith('https') ? href : `${import.meta.env.BASE_URL}${href}`; ---