No reward history yet. Start engaging with reward-eligible videos.
;
+ }
+
+ return (
+
+ {items.map((entry) => (
+
+
+
+ {entry.actionType} • {entry.rewardAmount > 0 ? `+${entry.rewardAmount}` : entry.rewardAmount} PERBUG • {new Date(entry.createdAt).toLocaleString()}
+
+ {entry.campaign?.fundingType === 'sponsored' ? Sponsored reward by {entry.campaign.sponsorName}
: null}
+ {entry.denialReason ? Denied: {entry.denialReason}
: null}
+
+ ))}
+
+ );
+}
+
+function Dashboard({ summary }: { summary: ViewerRewardSummary | null }) {
+ if (!summary) {
+ return Loading viewer earnings...
;
+ }
+
+ const stat = (label: string, value: number | undefined) => (
+
+ {stat('Lifetime', summary.lifetimeEarned)}{stat('Watch', summary.watchEarned)}{stat('Ratings', summary.ratingEarned)}
+ {stat('Comments', summary.commentEarned)}{stat('Sponsored', summary.sponsoredEarned)}{stat('Pending', summary.pending)}
+
+ Daily cap: {summary.dailyCap ?? 0} • Remaining: {summary.dailyRemaining ?? 0} • Current streak: {summary.currentStreakDays ?? 0} days
+
+
+ );
+}
+
+function Notifications({ notifications }: { notifications: ViewerRewardNotification[] }) {
+ if (!notifications.length) return null;
+
+ return (
+