rc lint errors fixed

This commit is contained in:
Sewmina 2025-08-19 13:14:13 +05:30
parent ce9599bc6f
commit ecb761a942
2 changed files with 9 additions and 1 deletions

View File

@ -1,6 +1,6 @@
'use client';
import { useState, useEffect } from 'react';
import { useState} from 'react';
import { ENTRY_FEE_DINO, MAX_ATTEMPTS } from '../shared';
interface LeaderboardEntry {

View File

@ -123,6 +123,14 @@ export default function Home() {
setDashboardData(data);
setDashboardError(null);
// Set highscore from first player in leaderboard if available
if (data.leaderboard && data.leaderboard.length > 0) {
const firstPlayerScore = parseInt(data.leaderboard[0].score);
if (!isNaN(firstPlayerScore)) {
setHighscore(firstPlayerScore);
}
}
// Increment refresh counter for smooth updates
if (!isInitialFetch) {
setRefreshCounter(prev => prev + 1);