This repository has been archived on 2024-10-29. You can view files and clone it, but cannot push or open issues or pull requests.
scoresaber-reloadedv3/src/components/fallback-link.tsx

24 lines
385 B
TypeScript
Raw Normal View History

import NextLink from "next/link";
type Props = {
/**
* The link to open in a new tab.
*/
href?: string;
/**
* The children to render.
*/
children: React.ReactNode;
};
export default function FallbackLink({ href, children }: Props) {
return href ? (
<NextLink href={href} target="_blank">
{children}
</NextLink>
) : (
<>{children}</>
);
}