import React from "react"; import { Card, CardBody, Box, CardFooter, Heading, IconButton, Link, chakra } from "@chakra-ui/react" import { useLink } from "../hooks" export type CardType = { id: string title: string; text: string; image: string; href: string; } export type CardItemProps = { card: CardType renderImage: (card: any) => JSX.Element } export function CardItemView({ card, renderImage }: CardItemProps) { const link = useLink(card) return ( {card.image && ( {renderImage(card)} )} {card.title} {'→'}} /> ) }