feat: add text color

This commit is contained in:
2026-02-19 23:18:30 +03:30
parent 9aff48019d
commit 74f2a82a0e
12 changed files with 44 additions and 40 deletions
+13 -1
View File
@@ -98,9 +98,19 @@ export function AuthProvider({ children }: { children: React.ReactNode }) {
}
}
// Clear localStorage
localStorage.removeItem('auth_token');
localStorage.removeItem('auth_user');
// Clear cookie - multiple methods to ensure it's removed
document.cookie = 'auth_token=; path=/; expires=Thu, 01 Jan 1970 00:00:01 GMT; SameSite=Strict';
document.cookie = 'auth_token=; path=/admin; expires=Thu, 01 Jan 1970 00:00:01 GMT; SameSite=Strict';
// Alternative: Clear all cookies
document.cookie.split(";").forEach(function (c) {
document.cookie = c.replace(/^ +/, "").replace(/=.*/, "=; path=/; expires=" + new Date().toUTCString() + ";");
});
setState({
user: null,
token: null,
@@ -108,7 +118,9 @@ export function AuthProvider({ children }: { children: React.ReactNode }) {
error: null,
});
router.push('/admin/login');
// Force hard navigation instead of router.push
window.location.href = '/admin/login';
// router.push('/admin/login');
};
return (