chore: fix push notif

This commit is contained in:
2026-03-02 18:29:29 +01:00
parent 06ddf705a0
commit 0085a39537
5 changed files with 45 additions and 4 deletions
-3
View File
@@ -8,7 +8,6 @@ import {
clearAllAuth,
} from './tokenStorage';
import { extractUsernameFromToken, extractRoleFromToken, isTokenExpired } from './jwtUtils';
import { removePushTokenFromBackend } from '../services/pushNotifications';
export type UserRole = 'client' | 'admin' | 'cabine' | 'livreur' | null;
@@ -137,8 +136,6 @@ export function AuthProvider({ children }: { children: ReactNode }) {
};
const logout = async () => {
// Supprimer le push token du backend avant de se déconnecter
try { await removePushTokenFromBackend(); } catch { /* silencieux */ }
await clearAllAuth();
setState({
token: null,