diff --git a/src/components/loaders/database-loader.tsx b/src/components/loaders/database-loader.tsx index 2e1a79e..41fd69a 100644 --- a/src/components/loaders/database-loader.tsx +++ b/src/components/loaders/database-loader.tsx @@ -23,7 +23,7 @@ export default function DatabaseLoader({ children }: Props) { setDatabase(db); console.log(`Loaded database in ${performance.now() - before}ms`); - db.on("ready", err => { + db.on("ready", () => { toast({ title: "Database loaded", description: "The database was loaded successfully.", diff --git a/src/components/player/player-scores.tsx b/src/components/player/player-scores.tsx index 22e6d3f..2a8f679 100644 --- a/src/components/player/player-scores.tsx +++ b/src/components/player/player-scores.tsx @@ -58,7 +58,7 @@ export default function PlayerScores({ initialScoreData, initialSearch, player, const [searchTerm, setSearchTerm] = useState(initialSearch || ""); const debouncedSearchTerm = useDebounce(searchTerm, 250); const [shouldFetch, setShouldFetch] = useState(false); // New state to control fetching - const topOfScoresRef = useRef(null); + const topOfScoresRef = useRef(null); const isSearchActive = debouncedSearchTerm.length >= 3; const { @@ -143,7 +143,7 @@ export default function PlayerScores({ initialScoreData, initialSearch, player, */ useEffect(() => { if (topOfScoresRef.current && shouldFetch) { - const topOfScoresPosition = (topOfScoresRef.current as any).getBoundingClientRect().top + window.scrollY; + const topOfScoresPosition = topOfScoresRef.current.getBoundingClientRect().top + window.scrollY; window.scrollTo({ top: topOfScoresPosition - 55, // Navbar height (plus some padding) behavior: "smooth",