feat(tictactoe): integrate leaderboard UI, provider API hook, and new styles

- Add *_BKP* ignore rule to .gitignore
- Insert Leaderboard component into TicTacToe screen
- Add getLeaderboardTop() API method to NakamaProvider and expose via context
- Add full leaderboard polling logic (interval-based) in new Leaderboard.tsx
- Style leaderboard in styles.css (rows, rank, name, score, empty state, card UI)
- Modernize TicTacToe UI styles (board, squares, buttons, layout)
- Replace matchmaking view with leaderboard integration
- Import ApiLeaderboardRecordList and ApiMatch types cleanly
This commit is contained in:
2025-11-28 19:43:59 +05:30
parent 33d917c8f2
commit 5fb3ad4205
4 changed files with 178 additions and 11 deletions

View File

@@ -1,7 +1,8 @@
import { useState, useEffect } from "react";
import { useNakama } from "./providers/NakamaProvider";
import { Match } from "@heroiclabs/nakama-js";
import Board from "./Board";
import Leaderboard from "./Leaderboard";
// import { Match } from "@heroiclabs/nakama-js";
// import MatchList from "./MatchList";
export default function TicTacToe() {
@@ -143,6 +144,7 @@ export default function TicTacToe() {
{/*/!* List open matches *!/*/}
{/*<MatchList matches={openMatches} />*/}
<Leaderboard/>
</>
)}