Skip to content

Commit

Permalink
fix: broken link renders
Browse files Browse the repository at this point in the history
Signed-off-by: Ar Rakin <rakinar2@onesoftnet.eu.org>
  • Loading branch information
virtual-designer authored Aug 28, 2024
1 parent 846e7e6 commit c2432d0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/Navigation/Link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ const Link: FC<LinkProps> = (
return (
<NextLink
href={
alwaysUseRootDomain
? `${FRONTEND_DOMAIN?.startsWith("localhost") ? "http://" : "https://"}${FRONTEND_DOMAIN}${href}`
: href
!alwaysUseRootDomain || href.startsWith("http://") || href.startsWith("https://") || href.startsWith("ftp://") || href.startsWith("mailto:")
? href
:`${FRONTEND_DOMAIN?.startsWith("localhost") ? "http://" : "https://"}${FRONTEND_DOMAIN}${href}`
}
ref={ref}
className={clsx(
Expand Down

0 comments on commit c2432d0

Please sign in to comment.