Updated next. Fixed link RSC fetch.

This commit is contained in:
Mike Cao 2025-12-03 15:11:40 -08:00
parent 41d2a24f9d
commit 64767b1896
8 changed files with 1155 additions and 1148 deletions

View file

@ -9,6 +9,7 @@ export interface LinkButtonProps extends ButtonProps {
scroll?: boolean;
variant?: any;
prefetch?: boolean;
asAnchor?: boolean;
children?: ReactNode;
}
@ -19,15 +20,22 @@ export function LinkButton({
target,
prefetch,
children,
asAnchor,
...props
}: LinkButtonProps) {
const { dir } = useLocale();
return (
<Button {...props} variant={variant} asChild>
<Link href={href} dir={dir} scroll={scroll} target={target} prefetch={prefetch}>
{children}
</Link>
{asAnchor ? (
<a href={href} target={target}>
{children}
</a>
) : (
<Link href={href} dir={dir} scroll={scroll} target={target} prefetch={prefetch}>
{children}
</Link>
)}
</Button>
);
}

View file

@ -50,7 +50,9 @@ export function PageHeader({
</Text>
)}
</Column>
<Row justifyContent="flex-end">{children}</Row>
<Row justifyContent="flex-end" alignItems="center">
{children}
</Row>
</Grid>
);
}