mirror of
https://github.com/umami-software/umami.git
synced 2026-02-09 15:17:23 +01:00
Updated next. Fixed link RSC fetch.
This commit is contained in:
parent
41d2a24f9d
commit
64767b1896
8 changed files with 1155 additions and 1148 deletions
|
|
@ -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>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,7 +50,9 @@ export function PageHeader({
|
|||
</Text>
|
||||
)}
|
||||
</Column>
|
||||
<Row justifyContent="flex-end">{children}</Row>
|
||||
<Row justifyContent="flex-end" alignItems="center">
|
||||
{children}
|
||||
</Row>
|
||||
</Grid>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue