import { PaginatedDocs } from 'payload' import { Author, Book, HoldRequest, Repository } from '@/payload-types' import { Button } from '../ui/button' import Image from 'next/image' type Props = { repos: PaginatedDocs | null } const HoldRequestNotifications = (props: Props) => { const { repos } = props const totalHoldNotifications = repos?.docs.flatMap((r) => r.holdRequests?.docs).length || 0 const holdRequestsByRepoElements = repos?.docs.map((r) => { return ( ) }) return (

Inbound Hold Requests

{!!totalHoldNotifications && ( {totalHoldNotifications} Unaddressed )}
{holdRequestsByRepoElements}
) } export default HoldRequestNotifications