feat(Auth): split AuthStore type to State and Actions

This commit is contained in:
Ilia Mashkov
2026-03-16 18:29:56 +03:00
parent 31f9bac50b
commit 3214fe716d

View File

@@ -1,7 +1,20 @@
import type { User } from "entities/User";
import type { AuthStatus } from "./service";
export interface AuthStore {
export interface AuthStoreState {
/**
* User's credentials
*/
user?: User;
status?: AuthStatus;
/**
* Authentication status
*/
status: AuthStatus;
}
export interface AuthStoreActions {
setUser: (user: AuthStoreState["user"] | undefined) => void;
setStatus: (status: AuthStoreState["status"]) => void;
}
export type AuthStore = AuthStoreState & AuthStoreActions;