fix(lint): tipagem estrita de Error em hook Auth e sync timeout de catch
This commit is contained in:
@@ -7,10 +7,10 @@ interface AuthContextType {
|
||||
user: User | null;
|
||||
session: Session | null;
|
||||
loading: boolean;
|
||||
signIn: (email: string, password: string) => Promise<{ error: any }>;
|
||||
signUp: (email: string, password: string) => Promise<{ error: any }>;
|
||||
signIn: (email: string, password: string) => Promise<{ error: unknown }>;
|
||||
signUp: (email: string, password: string) => Promise<{ error: unknown }>;
|
||||
signOut: () => Promise<void>;
|
||||
updatePassword: (password: string) => Promise<{ error: any }>;
|
||||
updatePassword: (password: string) => Promise<{ error: unknown }>;
|
||||
isRecoveryFlow: boolean;
|
||||
}
|
||||
|
||||
|
||||
@@ -309,7 +309,9 @@ export const useSessionLogs = () => {
|
||||
.from('user_session_logs')
|
||||
.update({ updated_at: new Date().toISOString() })
|
||||
.eq('id', sessionId)
|
||||
.catch(console.error);
|
||||
.then(({ error }) => {
|
||||
if (error) console.error('Heartbeat error:', error);
|
||||
});
|
||||
}
|
||||
}, 30000); // Atualizar a cada 30 segundos
|
||||
return () => clearInterval(interval);
|
||||
|
||||
Reference in New Issue
Block a user