fix(lint&types): resolve all lint warnings, typecheck errors and effect state updates across frontend application and admin panel
This commit is contained in:
1 parent
920dd532e8
commit
c1b2f416ed
29 files changed
+442
-352
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user