dev, prod, local environment fixes

This commit is contained in:
2026-10-06 11:21:09 +03:00
parent 4a7ea33185
commit b80fe40852
14 changed files with 202 additions and 42 deletions
+2 -1
View File
@@ -1 +1,2 @@
VITE_BACKEND_URL="change_me"
VITE_BACKEND_HOST="change_me"
VITE_BACKEND_PORT="change_me"
+7 -1
View File
@@ -1,6 +1,12 @@
import { refreshToken } from "./RefreshAPI/Refresh";
export const API_URL = import.meta.env.VITE_BACKEND_URL;
const API_HOST = import.meta.env.VITE_BACKEND_HOST ?? "";
const API_PORT = import.meta.env.VITE_BACKEND_PORT ?? "";
export const API_URL = API_HOST ? `${API_HOST}:${API_PORT}` : "";
let accessToken: string | null = null;
let refreshTimer: ReturnType<typeof setInterval> | null =null;
+2 -1
View File
@@ -7,7 +7,8 @@ import { usePermissions } from "../../hooks/usePermissions";
export function MainLayout({sidebar, header, content, right_sidebar }: { sidebar: ReactNode;header: ReactNode; content: ReactNode; right_sidebar: ReactNode }) {
const navigate = useNavigate();
const { permissions, loading } = usePermissions();
//const { permissions, loading } = usePermissions();
const { loading } = usePermissions();
if (loading) {
return null;