import React from 'react'; import { Player } from '../types'; import { MOCK_ORGS } from '../constants'; import InventoryGrid from '../components/InventoryGrid'; import { Icons } from '../components/IconSet'; interface PlayerProfileProps { player: Player; onBack: () => void; } const PlayerProfile: React.FC = ({ player, onBack }) => { const playerOrg = MOCK_ORGS.find(o => o.id === player.stats.organizationId); // Simple markdown renderer replacement for demo purposes // In production, use 'react-markdown' const renderMarkdown = (text: string) => { return text.split('\n').map((line, i) => { if (line.startsWith('# ')) return

{line.replace('# ', '')}

; if (line.startsWith('### ')) return

{line.replace('### ', '')}

; if (line.startsWith('> ')) return
{line.replace('> ', '')}
; if (line.startsWith('* ')) return
  • {line.replace('* ', '')}
  • ; return

    {line}

    ; }); }; return (
    {/* Header */}

    {player.username}

    {player.isOnline && ( Online )}
    {player.tags.map(tag => ( {tag} ))}
    {player.stats.playtimeHours}h
    Lvl {player.stats.level}
    {/* Left Col: Inventory */}
    {/* */}

    Zugehörigkeit

    {playerOrg ? playerOrg.name.charAt(0) : }
    {player.stats.role}
    {playerOrg ? ( {playerOrg.name} ) : ( 'Freiberufler / Keine Zugehörigkeit' )}
    {playerOrg && (
    {playerOrg.type} • {playerOrg.description}
    )}
    {/* Right Col: Story */}

    Charakter-Journal

    Markdown Rendered
    {renderMarkdown(player.storyMarkdown)}
    ); }; export default PlayerProfile;