Files
app-hejyou/src/components/EpFloat.jsx
admin 039d2cbbf4 feat: Fortschritt spürbar machen – Momente, Momentum & Storytelling
- +EP-Float am Button + hochzählendes EP-Badge (EpFloat, useCountUp)
- Level-/Streak-/Tagesziel-Overlay (MilestoneOverlay), getriggert aus der saveProgress-Response
- Combo-Zähler + variables Lob, ermutigendes Fehler-Feedback statt stillem Verschwinden
- Session-Summary mit Story-Zeilen statt End-Sackgasse
- Profil führt mit %-bis-Level + Capability-Satz; Kategorie-Stufen, Wochenvergleich, Sound-Toggle
- Level-Kurve gespiegelt (utils/leveling.js); Level deploy-unabhängig aus EP abgeleitet

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-17 21:43:56 +02:00

13 lines
454 B
JavaScript

import { useEffect } from 'react'
import './Moments.css'
// Kurzes „+N EP", das vom Bestätigen-Button aufschwebt — Belohnung genau dort,
// wo das Auge ist. Eltern-Element braucht position: relative.
export default function EpFloat({ points, onDone }) {
useEffect(() => {
const t = setTimeout(() => onDone?.(), 1000)
return () => clearTimeout(t)
}, [onDone])
return <span className="ep-float" aria-hidden="true">+{points} EP</span>
}