mirror of
https://github.com/MetaFam/TheGame.git
synced 2026-01-12 08:08:25 -05:00
* wc/wagmi/viem * replace * profile * replace context (,: * testing, clean up * wallet connect deploy * connect * remove type slive * podcast * podcast * heck yeah * feat: connect button * chore * trying siwe, network switch * redirect * prettying, cleaning up SIWE endpoints, & passing linting 🕊 * switching minting to Optimism & converting `ethers` to `wagmi` for contract access 🥧 * simplified onboarding & successfully minted ⛲ * typo * api key --------- Co-authored-by: Udit Takkar <udit222001@gmail.com> Co-authored-by: dysbulic <dys@dhappy.org>
43 lines
799 B
TypeScript
43 lines
799 B
TypeScript
import { Link } from '@metafam/ds';
|
|
import NextLink, { LinkProps } from 'next/link';
|
|
|
|
type Props = Omit<React.ComponentProps<typeof Link>, keyof LinkProps> &
|
|
LinkProps;
|
|
|
|
export const MetaLink: React.FC<Props> = ({
|
|
children,
|
|
href,
|
|
as,
|
|
replace,
|
|
scroll = true,
|
|
shallow,
|
|
isExternal,
|
|
...props
|
|
}) => {
|
|
if (isExternal && typeof href === 'string') {
|
|
return (
|
|
<Link color="cyan.400" isExternal href={href} {...props}>
|
|
{children}
|
|
</Link>
|
|
);
|
|
}
|
|
return (
|
|
<NextLink
|
|
{...{
|
|
href,
|
|
as,
|
|
replace,
|
|
scroll,
|
|
shallow,
|
|
}}
|
|
passHref={true}
|
|
legacyBehavior={true}
|
|
>
|
|
{/* NextLink passes the href */}
|
|
<Link color="cyan.400" {...props}>
|
|
{children}
|
|
</Link>
|
|
</NextLink>
|
|
);
|
|
};
|