// profile.jsx — User profile screen (mobile + desktop) // Adds the goal/gamification/notification layer that is core to sharewise but // missing from the redesigns so far. // ╔══════════════════════════════════════════════════════════════╗ // ║ PROFILE — Mobile ║ // ╚══════════════════════════════════════════════════════════════╝ function ProfileScreen({ dark }) { const t = useTheme(dark); return (
{/* Top app bar */} {/* Screen title block */}
Dein Profil
Stefan
{/* Identity strip */}
@stefan FOUNDER
Mitglied seit 07/2019
49 Following 17 Followers
{/* Trefferrate hero — the core sharewise metric */}
Trefferrate letzte 12 Monate
62% +4.2% MoM
36 von 58 Einschätzungen waren korrekt — Top 14% der Community.
{/* Stat tiles */}
{[ { label: 'Einschätzungen', val: '58', sub: 'gesamt' }, { label: 'Streak', val: '7', sub: 'Wochen 🔥' }, { label: 'Rang', val: '#142', sub: 'global' }, ].map(s => (
{s.label}
{s.val}
{s.sub}
))}
{/* Goal */}
{Icon.award(t.accent, 22)}
Predictor · Silver
10 Einschätzungen mit > 50% Rendite · mindestens 1 Jahr
6/10
{/* Tier preview */}
{[ { tier: 'Bronze', goal: '5× >30%', done: true }, { tier: 'Silver', goal: '10× >50%', active: true }, { tier: 'Gold', goal: '20× >100%' }, ].map(tr => (
{tr.done ? '✓ ' : ''}{tr.tier}
{tr.goal}
))}
{/* Notifications */}
{[ { name: 'fenjal', when: '14:16', verb: 'antwortete dir in', target: 'AMZN · Diskussion', preview: '"Der FTC-Overhang ist real, aber 5+ Jahre Litigation — bis dahin sind wir längst raus. ↑ stimme zu."', unread: true }, { name: 'PapaSmurf', when: '11:42', verb: 'erwähnte dich in', target: 'NVDA · Prediction', preview: '"@stefan dein FX-Argument war richtig — schau dir mal die Q3-Guidance an."', unread: true }, { name: 'Investorin_DE', when: 'gestern', verb: 'liked deinen Kommentar in', target: 'GOOGL · Diskussion', preview: '"Cost discipline + ad business ist die echte Story. Stop FTC, watch margins."', unread: true, isLike: true }, ].map((n, i) => (
{n.unread && (
)}
{n.name}{' '} {n.verb}{' '} {n.target}
{n.preview}
{n.when}
))}
{/* Heutige Top & Flops */}
{/* Tops */}
↑ Top
{[ { sym: 'NVDA', chg: '+3.2%' }, { sym: 'GOOGL', chg: '+1.4%' }, { sym: 'MSFT', chg: '+0.6%' }, ].map((r, i) => (
0 ? `0.5px solid ${t.border}` : 'none', }}> {r.sym} {r.chg}
))}
{/* Flops */}
↓ Flop
{[ { sym: 'AMZN', chg: '−1.5%' }, { sym: 'AAPL', chg: '−0.8%' }, { sym: 'PFI', chg: '−2.1%' }, ].map((r, i) => (
0 ? `0.5px solid ${t.border}` : 'none', }}> {r.sym} {r.chg}
))}
{/* Auszeichnungen */}
{[ { name: 'Streak 7', icon: '🔥', got: true, sub: 'Wochen' }, { name: 'Top 25%', icon: '🥇', got: true, sub: 'Trefferrate' }, { name: 'First Buy', icon: '✨', got: true, sub: 'Erste Einschätzung' }, { name: 'Predictor', icon: '🏆', got: false, sub: 'Bronze · 5× >30%' }, { name: 'Bewerter', icon: '⚖️', got: false, sub: '100 Pro/Kontra' }, ].map(b => (
{b.icon} {b.name} {b.sub}
))}
{/* Menu list */}
{[ { label: 'Einschätzungen', meta: '58', icon: Icon.trending }, { label: 'Bewertungen', meta: '24', icon: Icon.users }, { label: 'Kommentare', meta: '146', icon: Icon.message }, { label: 'Watchlisten', meta: '3', icon: Icon.bookmark }, { label: 'Musterdepots', meta: '1', icon: Icon.briefcase }, { label: 'Börsenspiele', meta: '8 aktiv', icon: Icon.award }, { label: 'Einstellungen', icon: Icon.more }, ].map((row, i) => (
0 ? `0.5px solid ${t.border}` : 'none', }}>
{row.icon(t.text, 16)}
{row.label} {row.meta && {row.meta}} {Icon.chevR(t.textDim, 14)}
))}
); } function SectionH({ t, label, cta, badge }) { return (
{label} {badge != null && ( {badge} )}
{cta && {cta} →}
); } Object.assign(window, { ProfileScreen });