UserContext
This commit is contained in:
10
src/utils/users/UserContext.ts
Normal file
10
src/utils/users/UserContext.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
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);
|
||||
Reference in New Issue
Block a user