import React from 'react' import ProfileWorldRecognitionBadge from './ProfileWorldRecognitionBadge' function formatDate(value) { if (!value) return null try { const date = new Date(value) if (Number.isNaN(date.getTime())) return null return date.toLocaleDateString('en-US', { month: 'short', day: 'numeric', year: 'numeric' }) } catch { return null } } export default function ProfileWorldHistoryCard({ entry }) { const recognitionBadges = Array.isArray(entry?.recognitions) ? entry.recognitions : [] const artwork = entry?.linked_artwork const challenge = entry?.challenge return (
{recognitionBadges.map((recognition, index) => ( ))}

{entry?.world?.title}

{entry?.world?.edition_year ? ( Edition {entry.world.edition_year} ) : null} {entry?.world?.type_label ? ( {entry.world.type_label} ) : null}
{entry?.world?.family_label ? ( {entry.world.family_label} ) : null} {formatDate(entry?.occurred_at) ? ( {formatDate(entry.occurred_at)} ) : null} {challenge?.title ? ( {challenge.title} ) : null}
{entry?.world?.url ? ( View world ) : null} {artwork?.url ? ( View artwork ) : null} {challenge?.url ? ( View challenge ) : null}
{artwork?.thumbnail_url ? (
{artwork.title
{artwork.title}
Linked artwork
) : (
World entry
)}
) }