diff --git a/app/src/components/ItemCard.tsx b/app/src/components/ItemCard.tsx index 1fbe087..85abcc0 100644 --- a/app/src/components/ItemCard.tsx +++ b/app/src/components/ItemCard.tsx @@ -2,15 +2,16 @@ interface ItemCardProps { item: string; index: number; cost: string; + imageURL?: string; } -export function ItemCard({ item, index, cost }: ItemCardProps) { +export function ItemCard({ item, index, cost, imageURL }: ItemCardProps) { return (
- {/* */} + {imageURL && }

{item}

diff --git a/app/src/components/ItemGrid.tsx b/app/src/components/ItemGrid.tsx index 3eb6f56..0b07e0f 100644 --- a/app/src/components/ItemGrid.tsx +++ b/app/src/components/ItemGrid.tsx @@ -1,7 +1,12 @@ import { ItemCard } from "./ItemCard"; import { IItems } from "../interfaces/interfaces"; -export default function ItemGrid({ listings }: { listings: IItems }) { +interface ItemGridProps { + listings: IItems; + imageURLs: IItems; +} + +export default function ItemGrid({ listings, imageURLs }: ItemGridProps) { return ( <> @@ -13,7 +18,7 @@ export default function ItemGrid({ listings }: { listings: IItems }) {
- +
))}
diff --git a/app/src/components/Items.tsx b/app/src/components/Items.tsx index 7bc6bbd..998504e 100644 --- a/app/src/components/Items.tsx +++ b/app/src/components/Items.tsx @@ -11,6 +11,7 @@ interface IScrapeResults { recent_change: IChanges; current_listings: IItems; last_change: ILastChange; + images: IItems; } const API_STATUS_URL = "https://j50pzswk.status.cron-job.org/"; @@ -135,7 +136,7 @@ export default function Items() { recentChange={scrapeResults.recent_change} lastChange={scrapeResults.last_change} > - + )}