Files
profi-frontend/src/utils/users/UserContext.ts

11 lines
297 B
TypeScript
Raw Normal View History

2025-06-01 21:39:44 +03:00
import {Account} from "../../types/users.ts";
import {createContext} from "react";
export type UserContextType = {
user: Account | undefined;
login: (userData: Account) => void;
logout: () => void;
};
export const UserContext = createContext<UserContextType | undefined>(undefined);