1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2026-01-15 08:22:59 -05:00

finally fix slow typescript compilation!

see https://github.com/stitchesjs/stitches/issues/1038
This commit is contained in:
2022-06-13 06:47:29 -04:00
parent cef74d4e97
commit 1776173cab
22 changed files with 104 additions and 101 deletions

View File

@@ -2,7 +2,6 @@ import NextLink from "next/link";
import { styled } from "../../lib/styles/stitches.config";
import { baseUrl } from "../../lib/config";
import type { ComponentProps } from "react";
import type { LinkProps as NextLinkProps } from "next/link";
const StyledLink = styled(NextLink, {
color: "$link",
@@ -37,11 +36,9 @@ const StyledLink = styled(NextLink, {
},
});
export type LinkProps = Omit<ComponentProps<typeof StyledLink>, "href"> &
NextLinkProps & {
underline?: boolean;
openInNewTab?: boolean;
};
export type LinkProps = ComponentProps<typeof StyledLink> & {
openInNewTab?: boolean;
};
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