Fix History component useEffect dependency array

This commit is contained in:
nmemmert committed 2025-12-10 15:32:29 -05:00
1 parent c7ebc5aff3
commit 3c947ef6a3
1 file changed
+1 -2
+1 -2
View File
@@ -19,6 +19,7 @@ function History() {
const [days, setDays] = useState(7);
const [loading, setLoading] = useState(true);
useEffect(() => {
const loadHistory = async () => {
setLoading(true);
try {
@@ -31,9 +32,7 @@ function History() {
}
};
useEffect(() => {
loadHistory();
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [days]);
if (loading) return <div className="container">Loading history...</div>;