refactor: refactor foundation

This commit is contained in:
2026-08-14 09:43:19 +03:00
parent 2e32d226d3
commit da585b157a
54 changed files with 4822 additions and 535 deletions
+3 -2
View File
@@ -1,7 +1,7 @@
import { useQueryClient } from "@tanstack/react-query";
import { createContext, useContext, useEffect, useRef, useState } from "react";
import { apiClient, configureAuthClient } from "../../../shared/api";
import type { paths } from "../../../shared/api/generated/schema";
import { apiClient, configureAuthClient } from "@/shared/api";
import type { paths } from "@/shared/api/generated/schema";
type User =
paths["/api/v1/auth/me"]["get"]["responses"][200]["content"]["application/json"];
@@ -71,6 +71,7 @@ export function AuthProvider({ children }: { children: React.ReactNode }) {
const authentication = data as Authentication;
setUser(authentication.user);
setAccessToken(authentication.accessToken);
accessTokenRef.current = authentication.accessToken;
})
.finally(() => setReady(true));
}, []);