Skip to content

Commit

Permalink
some fix
Browse files Browse the repository at this point in the history
  • Loading branch information
version-1 committed Feb 29, 2024
1 parent 5b9790c commit 886b3d5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
1 change: 0 additions & 1 deletion frontend/core/src/app/main/layout.module.css
@@ -1,5 +1,4 @@
.body {
height: calc(100vh - 72px);
}

.main {
Expand Down
6 changes: 0 additions & 6 deletions frontend/core/src/components/shared/sidebar/index.module.css
Expand Up @@ -89,12 +89,6 @@
padding: 16px;
}

.footer {
height: 40px;
background: var(--primary-color);
background: #f0f0f0;
}

.sidebarToggle {
cursor: pointer;
transition: transform .2s;
Expand Down
6 changes: 4 additions & 2 deletions frontend/core/src/services/api/index.ts
@@ -1,7 +1,9 @@
import axios, { AxiosError, AxiosInstance } from "axios";
import mockApi from "./mock";

export const getAccessToken = () => sessionStorage?.getItem('token') || '';
const _sessionStorage = typeof sessionStorage !== 'undefined' ? sessionStorage : undefined

export const getAccessToken = () => _sessionStorage?.getItem('token') || '';

export const setUserId = (uuid: string) => localStorage.setItem("uuid", uuid);
export const getUserId = () => localStorage.getItem("uuid") || "";
Expand Down Expand Up @@ -36,7 +38,7 @@ class Client {
}

setAccessToken = (token: string) => {
sessionStorage?.setItem('token', token)
_sessionStorage?.setItem('token', token)
if (this._instance) {
this._instance.defaults.headers["Authorization"] = `Bearer ${token}`;
}
Expand Down

0 comments on commit 886b3d5

Please sign in to comment.