perf: avoid layout re-rendering

This commit is contained in:
Riccardo
2024-01-25 18:12:37 +01:00
parent 551bff815f
commit dbefdc49e2
15 changed files with 137 additions and 135 deletions

View File

@@ -0,0 +1,15 @@
import Link from 'next/link';
import { Button } from '../ui/button';
type LinkProps = {
path: string;
text: string;
};
export function CustomLink({ path, text }: LinkProps) {
return (
<Button asChild>
<Link href={path}>{text}</Link>
</Button>
);
}