Skip to content

Feat/game history#131

Open
AdekunleBamz wants to merge 2 commits into
DeborahOlaboye:mainfrom
AdekunleBamz:feat/game-history
Open

Feat/game history#131
AdekunleBamz wants to merge 2 commits into
DeborahOlaboye:mainfrom
AdekunleBamz:feat/game-history

Conversation

@AdekunleBamz

Copy link
Copy Markdown

Summary

This PR adds a GameHistory component to track and display past trivia game sessions.

New Features

GameHistory Component

  • Session Tracking: Display past game sessions with details:
    • Correct answers count (e.g., "8/10 correct")
    • Game duration (MM:SS format)
    • ETH reward earned
    • Date and time of game
  • Status Badges: Visual indicators for:
    • ✅ Completed (all questions answered)
    • ⚠️ Partial (some questions unanswered)
    • ❌ Abandoned (game timed out)
  • Animated Entries: Smooth entry animations using framer-motion
  • Loading State: Skeleton loader while fetching data
  • Empty State: Encouraging message for new players

Files Added

  • frontend/src/components/GameHistory.tsx - Game history display component

Usage

import { GameHistory } from '@/components/GameHistory';

<GameHistory 
  sessions={gameSessions}
  isLoading={isLoading}
  currentUserAddress={address}
/>

SmartFlow Developer and others added 2 commits January 5, 2026 19:13
- Implement bulkAddQuestions for adding up to 25 questions in single transaction
- Add bulkSubmitAnswers for submitting answers to up to 20 questions at once
- Include bulkDistributeRewards for distributing rewards to up to 30 players
- Add bulkUpdateQuestionStatus and bulkUpdateRewards for efficient admin operations
- Implement gas estimation utilities and bulk operation limits checking
- Add comprehensive test suite with 25+ test cases covering all bulk operations
- Include bulk analytics functions for question stats and user performance metrics
- Update README with bulk operations features and enhanced documentation
- Add GameHistory component to track past trivia sessions
- Show game results with score, duration, and rewards
- Display status badges (completed/partial/abandoned)
- Include animated entry transitions with framer-motion
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants