1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2026-06-13 19:55:26 -04:00

enable experimental next/future/image (#973)

This commit is contained in:
2022-06-27 20:45:02 -04:00
committed by GitHub
parent a4602335a1
commit f826f59fcc
14 changed files with 183 additions and 184 deletions
+2 -1
View File
@@ -43,7 +43,8 @@ export type LinkProps = ComponentProps<typeof StyledLink> & {
const Link = ({ href, rel, target, prefetch = false, underline = true, openInNewTab, ...rest }: LinkProps) => {
// This component auto-detects whether or not this link should open in the same window (the default for internal
// links) or a new tab (the default for external links). Defaults can be overridden with `openInNewTab={true}`.
const isExternal = typeof href === "string" && !href.startsWith("/") && !href.startsWith(baseUrl);
const isExternal =
typeof href === "string" && !(href.startsWith("/") || href.startsWith("#") || href.startsWith(baseUrl));
if (openInNewTab || isExternal) {
return (