Refactor BrandLogo component to use native img element for improved loading performance and adjust styling for better responsiveness. Removed fixed width/height attributes to maintain aspect ratio.
Deploy edu.mstaut.ir / deploy (push) Successful in 11m53s

This commit is contained in:
smhk1376 committed 2026-10-16 17:28:12 +03:30
1 parent 2709181557
commit 5b0a394216
1 file changed
+6 -12
+6 -12
View File
@@ -37,23 +37,17 @@ export function BrandLogo({
return ( return (
<Link <Link
href={href} href={href}
className={cn( className={cn("inline-flex h-full shrink-0 items-center", className)}
"group inline-flex min-w-0 items-center",
compact ? "h-14" : "h-full",
className,
)}
aria-label={ariaLabel} aria-label={ariaLabel}
> >
<Image {/* Native img: no fixed width/height attrs; ratio comes from the asset. */}
<img
src={HORIZONTAL_SRC} src={HORIZONTAL_SRC}
alt={ariaLabel} alt={ariaLabel}
width={1888} decoding="async"
height={607} fetchPriority="high"
priority
sizes="(max-width:640px) 22rem, 30rem"
className={cn( className={cn(
"h-full w-auto object-contain object-right", "h-[75%] w-auto max-w-none",
// Asset is white-on-black; blend so the plate disappears into the header.
onDark ? "mix-blend-screen" : "invert mix-blend-multiply", onDark ? "mix-blend-screen" : "invert mix-blend-multiply",
)} )}
/> />