From e615810ecd84413bd6aed45f6b38326a1e949d90 Mon Sep 17 00:00:00 2001 From: algafur Date: Mon, 23 Sep 2024 17:52:39 +0500 Subject: [PATCH] fix: bugs --- package.json | 2 +- src/shared/api/api-query/api-query.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 40f33d2..06afa3e 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "build:main": "vite build --mode production", "build:dev": "vite build --mode development", "lint": "eslint react-template --ext ts,tsx --report-unused-disable-directives --max-warnings 0", - "preview": ".env | grep 'ALGA' && vite preview" + "preview": "vite preview" }, "dependencies": { "@ant-design/icons": "^5.4.0", diff --git a/src/shared/api/api-query/api-query.ts b/src/shared/api/api-query/api-query.ts index a5d0298..afa25ad 100644 --- a/src/shared/api/api-query/api-query.ts +++ b/src/shared/api/api-query/api-query.ts @@ -7,7 +7,7 @@ const createAxiosInstance = async () => { const axiosInstance = axios.create({ baseURL: import.meta.env.VITE_API_ADDRESS, }) - console.log(import.meta.env.VITE_API_ADDRESS) + if (token) { axiosInstance.defaults.headers.common['Authorization'] = `Bearer ${token}` }