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,17 +1,18 @@
import { useState, useEffect } from "react";
import { useIsMobile } from "../components/contexts/MobileContext";
import { useState, useEffect } from 'react';
import { useIsMobile } from '../components/contexts/MobileContext';
export const useMaxWidth = () => {
const isMobile = useIsMobile();
const [maxWidth, setMaxWidth] = useState("600px");
const [maxWidth, setMaxWidth] = useState('600px');
const calculateMaxWidth = () => {
if (isMobile) {
setMaxWidth("800px");
setMaxWidth('800px');
} else if (window.innerWidth < 1024) {
setMaxWidth("500px");
setMaxWidth('500px');
} else {
setMaxWidth("800px");
setMaxWidth('800px');
}
};
@@ -22,10 +23,10 @@ export const useMaxWidth = () => {
calculateMaxWidth();
};
window.addEventListener("resize", handleResize);
window.addEventListener('resize', handleResize);
return () => {
window.removeEventListener("resize", handleResize);
window.removeEventListener('resize', handleResize);
};
}, [isMobile]);