Skip to content

Commit 3505b31

Browse files
committed
Fix ESLint errors: add alt props and remove explicit any types
1 parent ddc3da4 commit 3505b31

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/components/gallery/GalleryImage.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export const GalleryImage = ({
2121
imageRef.current,
2222
<Image
2323
{...props}
24+
alt={props.alt || "Gallery image"}
2425
className={`${props.className} cursor-default`}
2526
style={{ width: "100%", height: "100%", objectFit: "contain" }}
2627
/>,
@@ -32,6 +33,7 @@ export const GalleryImage = ({
3233
return (
3334
<Image
3435
{...props}
36+
alt={props.alt || "Gallery image"}
3537
ref={imageRef}
3638
className={`${props.className} ${enableGallery ? "cursor-pointer" : ""}`}
3739
onClick={enableGallery ? handleClick : props.onClick}

src/components/gallery/GalleryVideo.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ interface GalleryVideoProps extends VideoHTMLAttributes<HTMLVideoElement> {
1010

1111
export const GalleryVideo = ({ enableGallery = true, children, ...props }: GalleryVideoProps) => {
1212
const videoRef = useRef<HTMLVideoElement>(null);
13-
const expandedVideoRef = useRef<HTMLVideoElement>(null);
1413
const { openGallery } = useGallery();
1514
const [videoSrc, setVideoSrc] = useState<string | undefined>(undefined);
1615
const [isLoaded, setIsLoaded] = useState(false);
@@ -20,7 +19,7 @@ export const GalleryVideo = ({ enableGallery = true, children, ...props }: Galle
2019
const extractSrc = () => {
2120
const childArray = Array.isArray(children) ? children : [children];
2221
const sourceChild = childArray.find(
23-
(child: any) => child?.type === "source"
22+
(child: unknown) => (child as ReactElement)?.type === "source"
2423
) as ReactElement<{ src: string }>;
2524

2625
if (sourceChild?.props?.src) {

0 commit comments

Comments
 (0)