Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add type to SearchCardImage
Looks like the SearchCardImage doesn't know what props it is receiving,
so add it in!
  • Loading branch information
sarangj committed Apr 28, 2026
commit 24c2c265516e9b1929d0947484e3289dd1f3e692
8 changes: 7 additions & 1 deletion app/src/components/card/searchCardImage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,14 @@ import Image from "next/image";
import React from "react";
import { useState } from "react";
import { Box } from "@nypl/design-system-react-components";
import SearchCardType from "@/src/types/SearchCardType";

export const SearchCardImage = ({ record, viewMode }) => {
type SearchCardImageProps = {
record: SearchCardType;
viewMode: "grid" | "list";
};

export const SearchCardImage = ({ record, viewMode }: SearchCardImageProps) => {
const [imageSrc, setImageSrc] = useState(
record.videoThumbnail || (record.imageID ? record.imageURL : "/noImage.png")
);
Expand Down