fix: add priority prop to Logo component for LCP optimization on auth pages

- Add optional priority prop to Logo component (defaults to false)
- Set priority=true on login and register pages to preload logo
- Logo on other pages remains lazy-loaded by default
- Improves LCP on critical auth pages by eliminating lazy-load delay
This commit is contained in:
SohamBhattacharjee2003 2026-04-03 18:32:13 +05:30
parent 4131e6bea9
commit 414c4c86e9
3 changed files with 5 additions and 2 deletions

View file

@ -5,9 +5,11 @@ import { cn } from "@/lib/utils";
export const Logo = ({
className,
disableLink = false,
priority = false,
}: {
className?: string;
disableLink?: boolean;
priority?: boolean;
}) => {
const image = (
<Image
@ -16,6 +18,7 @@ export const Logo = ({
alt="logo"
width={128}
height={128}
priority={priority}
/>
);