cleaned code from logs and some comments

This commit is contained in:
Jelaletdin12
2025-12-19 18:14:29 +05:00
parent 0fb4e2765c
commit cdc9fa686f
45 changed files with 368 additions and 501 deletions

View File

@@ -28,12 +28,11 @@ class TokenStorage {
static setAuthToken(token: string): void {
if (!this.isClient) return;
localStorage.setItem(AUTH_TOKEN_KEY, token);
localStorage.removeItem(GUEST_TOKEN_KEY); // Auth token replaces guest token
localStorage.removeItem(GUEST_TOKEN_KEY);
}
static setGuestToken(token: string): void {
if (!this.isClient) return;
// Only set guest token if no auth token exists
if (!this.getAuthToken()) {
localStorage.setItem(GUEST_TOKEN_KEY, token);
}