fix(lint&types): resolve all lint warnings, typecheck errors and effect state updates across frontend application and admin panel

This commit is contained in:
parsa aghaei committed 2026-08-03 10:13:11 +03:30
1 parent 920dd532e8
commit c1b2f416ed
29 files changed
+442 -352

No files matched your search

@@ -1,13 +1,11 @@
import { useState, useEffect } from 'react';
export function useNetworkStatus() {
const [isOnline, setIsOnline] = useState(true);
const [isOnline, setIsOnline] = useState(() =>
typeof navigator !== 'undefined' ? navigator.onLine : true
);
useEffect(() => {
if (typeof window !== 'undefined' && typeof navigator !== 'undefined') {
setIsOnline(navigator.onLine);
}
const handleOnline = () => setIsOnline(true);
const handleOffline = () => setIsOnline(false);