Spaces:
Configuration error
Configuration error
Download src/components/link/LinkButton.tsx from hlsitech/hlsitechbot: direct link, hf CLI and curl.
- Browser
- Download file 442 Bytes
-
https://huggingface.co/spaces/hlsitech/hlsitechbot/resolve/main/src/components/link/LinkButton.tsx
- Command line
-
hf download hf://spaces/hlsitech/hlsitechbot/src/components/link/LinkButton.tsx
-
curl -L -o LinkButton.tsx https://huggingface.co/spaces/hlsitech/hlsitechbot/resolve/main/src/components/link/LinkButton.tsx
442 Bytes
| '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> | |
| ); | |
| } | |