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.
Liam b7783f5a4d
All checks were successful
Deploy Website / deploy (push) Successful in 5m3s
fix mapper link for song to
2024-10-13 00:37:16 +01:00

30 lines
539 B
TypeScript

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