feat: new homepage

This commit is contained in:
TrèsAbhi committed 2024-06-03 17:45:50 -05:00
1 parent 847d605f08
commit 3d2b443dc7
4 files changed
+164 -40

No files matched your search

+13 -22
View File
@@ -1,29 +1,20 @@
import {
Link as RadixLink,
LinkProps as RadixLinkProps,
} from '@radix-ui/themes';
import NextLink from 'next/link';
'use client';
interface LinkProps extends RadixLinkProps {
href: string;
}
import { LinkProps } from '@radix-ui/themes';
import { useRouter } from 'next/navigation';
export function Link({ href, onClick, ...props }: LinkProps) {
const router = useRouter();
export function Link({ href, children, target, onClick, ...props }: LinkProps) {
return (
<RadixLink
<Link
href={href}
onClick={(event) => event.preventDefault()}
onClick={(event) => {
event.preventDefault();
if (href) router.push(href);
onClick?.(event);
}}
{...props}
>
<NextLink
tabIndex={-1}
href={href}
target={target}
onClick={onClick}
style={{ all: 'inherit' }}
>
{children}
</NextLink>
</RadixLink>
/>
);
}