Skip to content

Commit

Permalink
Logo - Fixing overlapping text and placeholder image (#2345)
Browse files Browse the repository at this point in the history
* Logo - Fixing overlapping text and placeholder image

Fixed: #2344

Affected Route: `/logo/ssw`

Screenshot: TODO

* Adding placeholder image

* Adding new broken image

* Removing PNG
  • Loading branch information
amankumarrr authored Mar 24, 2024
1 parent 88f4735 commit 79953fa
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions components/blocks/colorBlock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const ColorRow = (props: ColorRow) => {
<>
<div
className={classNames(
"col-span-1 my-0 flex flex-col items-center justify-center px-4 md:h-10",
"col-span-1 my-0 flex flex-col items-center justify-center px-4",
sswColors[`${firstColor}`]
)}
>
Expand All @@ -61,7 +61,7 @@ const ColorRow = (props: ColorRow) => {
</div>
<div
className={classNames(
"col-span-1 my-0 flex flex-col items-center justify-center px-4 md:h-10",
"col-span-1 my-0 flex flex-col items-center justify-center px-4 ",
sswColors[`${secondColor}`]
)}
>
Expand Down
6 changes: 4 additions & 2 deletions components/blocks/downloadBlock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ const Download = (data: Downloads) => {
secondLink,
secondLinkText,
} = data;

const srcImage = img && !isImgBroken ? img : "/images/broken-image.jpg";
return (
<div className="col-span-1">
<div className={classNames("py-3 text-black md:px-6")}>
Expand All @@ -69,10 +71,10 @@ const Download = (data: Downloads) => {
)}
data-tina-field={tinaField(data, "img")}
>
{img && !isImgBroken && (
{img && (
<Image
onError={() => setIsImgBroken(true)}
src={img}
src={srcImage}
alt={header}
height={400}
width={210}
Expand Down
Binary file added public/images/broken-image.jpg
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 79953fa

Please sign in to comment.