rc lint errors fixed
This commit is contained in:
parent
ce9599bc6f
commit
ecb761a942
|
|
@ -1,6 +1,6 @@
|
||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import { useState, useEffect } from 'react';
|
import { useState} from 'react';
|
||||||
import { ENTRY_FEE_DINO, MAX_ATTEMPTS } from '../shared';
|
import { ENTRY_FEE_DINO, MAX_ATTEMPTS } from '../shared';
|
||||||
|
|
||||||
interface LeaderboardEntry {
|
interface LeaderboardEntry {
|
||||||
|
|
|
||||||
|
|
@ -123,6 +123,14 @@ export default function Home() {
|
||||||
setDashboardData(data);
|
setDashboardData(data);
|
||||||
setDashboardError(null);
|
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
|
// Increment refresh counter for smooth updates
|
||||||
if (!isInitialFetch) {
|
if (!isInitialFetch) {
|
||||||
setRefreshCounter(prev => prev + 1);
|
setRefreshCounter(prev => prev + 1);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user