fix(lint): silenciados ultimos warnings de dependencia e formatacao md
This commit is contained in:
@@ -279,6 +279,7 @@ export function AuthProvider({ children }: { children: ReactNode }) {
|
|||||||
if (cleanupFn) cleanupFn();
|
if (cleanupFn) cleanupFn();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
// Limpeza periódica de usuários offline e listener de fechamento de janela
|
// Limpeza periódica de usuários offline e listener de fechamento de janela
|
||||||
@@ -330,6 +331,7 @@ export function AuthProvider({ children }: { children: ReactNode }) {
|
|||||||
window.removeEventListener('beforeunload', handleBeforeUnload);
|
window.removeEventListener('beforeunload', handleBeforeUnload);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
}, [user?.id, authInitialized]);
|
}, [user?.id, authInitialized]);
|
||||||
|
|
||||||
const signIn = async (email: string, password: string) => {
|
const signIn = async (email: string, password: string) => {
|
||||||
@@ -410,6 +412,7 @@ export function AuthProvider({ children }: { children: ReactNode }) {
|
|||||||
return <AuthContext.Provider value={value}>{children}</AuthContext.Provider>;
|
return <AuthContext.Provider value={value}>{children}</AuthContext.Provider>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// eslint-disable-next-line react-refresh/only-export-components
|
||||||
export function useAuth() {
|
export function useAuth() {
|
||||||
const context = useContext(AuthContext);
|
const context = useContext(AuthContext);
|
||||||
if (context === undefined) {
|
if (context === undefined) {
|
||||||
|
|||||||
@@ -324,6 +324,7 @@ export const useSessionLogs = () => {
|
|||||||
} else if (!user && currentSessionId) {
|
} else if (!user && currentSessionId) {
|
||||||
endSession();
|
endSession();
|
||||||
}
|
}
|
||||||
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
}, [user]);
|
}, [user]);
|
||||||
|
|
||||||
// Finalizar sessão quando a janela é fechada
|
// Finalizar sessão quando a janela é fechada
|
||||||
|
|||||||
Reference in New Issue
Block a user