Skip to content

Commit

Permalink
fix: Brands fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
yuriassuncx committed Oct 22, 2024
1 parent e967a79 commit 3e36fe1
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 27 deletions.
17 changes: 14 additions & 3 deletions components/ui/ThirdBanners.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ export interface Banner {
*/
link: string;
target?: "_blank" | "_self";
width?: number;
height?: number;
}

export interface Props {
Expand All @@ -26,7 +28,16 @@ export interface Props {
}

function BannerCard(
{ image, alt, title, description, link = "#", target = "_blank" }: Banner,
{
image,
alt,
title,
description,
link = "#",
target = "_blank",
width,
height,
}: Banner,
) {
return (
<div class="flex flex-col items-center justify-center gap-6 w-full h-full">
Expand All @@ -36,8 +47,8 @@ function BannerCard(
>
<Image
src={image}
width={423}
height={321}
width={width || 423}
height={height || 321}
alt={alt}
loading="lazy"
fetchPriority="low"
Expand Down
4 changes: 2 additions & 2 deletions sections/Content/Brands.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ export default function Brands(
>
<Image
src={brand.image}
width={160 || brand.width}
height={36 || brand.height}
width={brand.width || 160}
height={brand.height || 36}
loading="lazy"
decoding="async"
class="w-full"
Expand Down
44 changes: 22 additions & 22 deletions static/sprites.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 3e36fe1

Please sign in to comment.