rc lint errors fixed
This commit is contained in:
parent
ce9599bc6f
commit
ecb761a942
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user