Skip to content

Commit

Permalink
fix alt text
Browse files Browse the repository at this point in the history
  • Loading branch information
Gam3rrXD committed Jan 12, 2024
1 parent daf35b0 commit 15b9972
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion client/src/components/Card.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const Card = ({ title, text, image }) => {
<p className="font-productsans text-base">{text}</p>
</div>
<div className="flex-1 w-full ">
<LazyImage img={image} style="object-cover w-[500px] h-full rounded" />
<LazyImage alt="Card" img={image} style="object-cover w-[500px] h-full rounded" />
</div>
</div>
);
Expand Down
4 changes: 2 additions & 2 deletions client/src/components/LazyImage.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useEffect, useRef, useState } from "react";

const LazyImage = ({ img, style }) => {
const LazyImage = ({ img, alt, style }) => {
const ref = useRef();
const [visible, setVisible] = useState(false);

Expand All @@ -23,7 +23,7 @@ const LazyImage = ({ img, style }) => {
}, []);

return visible ? (
<img src={img} alt="Image" className={style} />
<img src={img} alt={alt} className={style} />
) : (
<img ref={ref} style={{ backgroundColor: "gray" }} className={style} />
);
Expand Down
1 change: 1 addition & 0 deletions client/src/components/Splash.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const Splash = ({ title, subtitle, image }) => {
/> */}
<LazyImage
img={image}
alt="Splash"
style="object-cover h-full w-full absolute mix-blend-overlay"
/>
<h1 className="text-7xl sm:text-9xl text-center font-scoutcond italic font-extrabold text-transparent bg-clip-text text-white px-4 z-10">
Expand Down

0 comments on commit 15b9972

Please sign in to comment.