fix(lint&types): resolve all lint warnings, typecheck errors and effect state updates across frontend application and admin panel

This commit is contained in:
parsa aghaei committed 2026-08-03 10:13:11 +03:30
1 parent 920dd532e8
commit c1b2f416ed
29 files changed
+442 -352

No files matched your search

+2 -2
View File
@@ -1,5 +1,6 @@
import axios from 'axios';
import { toast } from 'sonner';
import { useUserStore } from '../store/userStore';
const baseURL = process.env.NEXT_PUBLIC_API_URL || (process.env.NODE_ENV === 'development' ? 'http://localhost:4001/api' : '/api');
@@ -8,7 +9,7 @@ export interface ApiErrorPayload {
statusCode: number;
message: string;
code: string;
details?: Array<{ field: string; message: string }> | Record<string, any>;
details?: Array<{ field: string; message: string }> | Record<string, unknown>;
timestamp?: string;
path?: string;
}
@@ -50,7 +51,6 @@ api.interceptors.response.use(
localStorage.removeItem('accessToken');
localStorage.removeItem('refreshToken');
try {
const { useUserStore } = require('../store/userStore');
useUserStore.getState().logout();
} catch {
// Ignore if store not ready