adds eslint

This commit is contained in:
geoffsee
2025-06-24 17:29:52 -04:00
committed by Geoff Seemueller
parent 9698fc6f3b
commit 02c3253343
169 changed files with 4896 additions and 4804 deletions

View File

@@ -1,4 +1,4 @@
import { useEffect, useState } from "react";
import { useEffect, useState } from 'react';
const usePageLoaded = (callback: () => void) => {
const [isLoaded, setIsLoaded] = useState(false);
@@ -9,15 +9,15 @@ const usePageLoaded = (callback: () => void) => {
callback();
};
if (document.readyState === "complete") {
if (document.readyState === 'complete') {
// Page is already fully loaded
handlePageLoad();
} else {
// Wait for the page to load
window.addEventListener("load", handlePageLoad);
window.addEventListener('load', handlePageLoad);
}
return () => window.removeEventListener("load", handlePageLoad);
return () => window.removeEventListener('load', handlePageLoad);
}, [callback]);
return isLoaded;