update pay function
This commit is contained in:
20
boilerplate-chakra-pro-main/components/link/LinkButton.tsx
Normal file
20
boilerplate-chakra-pro-main/components/link/LinkButton.tsx
Normal file
@@ -0,0 +1,20 @@
|
||||
'use client';
|
||||
import Link, { LinkProps } from 'next/link';
|
||||
import { Button, ButtonProps } from '@chakra-ui/react';
|
||||
|
||||
type ChakraAndNextProps = ButtonProps & LinkProps;
|
||||
|
||||
export default function LinkButton({
|
||||
href,
|
||||
children,
|
||||
prefetch = true,
|
||||
...props
|
||||
}: ChakraAndNextProps) {
|
||||
return (
|
||||
<Link href={href} passHref prefetch={prefetch}>
|
||||
<Button as="a" variant="a" {...props}>
|
||||
{children}
|
||||
</Button>
|
||||
</Link>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user