From c25f931cd1ca8e585f473da747518e5649035161 Mon Sep 17 00:00:00 2001 From: Dan Head Date: Tue, 2 Feb 2021 11:26:09 +0000 Subject: [PATCH] fix(link): internal link bug --- src/components/link.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/components/link.js b/src/components/link.js index 6706e48..819b89c 100644 --- a/src/components/link.js +++ b/src/components/link.js @@ -18,9 +18,15 @@ const StyledLink = styled.a` `; export default function Link({ children, to, ...other }) { - const isInternal = /^\/(?!\/)/.test(to); + if (/^\/(?!\/)/.test(to)) { + return ( + + {children} + + ); + } return ( - + {children} );