import React from 'react'; import Image from 'next/image'; import { useImageProxy } from '@/hooks/useImageProxy'; import { formatUnixTimestamp } from '@/utils/time'; import { Tag } from 'primereact/tag'; import { Message } from 'primereact/message'; import GenericButton from '@/components/buttons/GenericButton'; import useWindowWidth from '@/hooks/useWindowWidth'; import { BookOpen } from 'lucide-react'; const ContentDropdownItem = ({ content, onSelect }) => { const { returnImageProxy } = useImageProxy(); const windowWidth = useWindowWidth(); const isMobile = windowWidth <= 600; return (
onSelect(content)} >
content thumbnail

{content?.title || content?.name}

{content?.price > 0 ? ( ) : ( )}
{content?.summary && (

{content.summary}

)}
{content?.topics?.map(topic => ( ))}
{content?.published_at || content?.created_at ? `Published: ${formatUnixTimestamp(content?.published_at || content?.created_at)}` : 'Not yet published'}
{!isMobile && ( { e.stopPropagation(); onSelect(content); }} className="items-center py-1 shadow-sm hover:shadow-md transition-shadow duration-200" /> )}
); }; export default ContentDropdownItem;