* multi user wip * WIP MUM features * invitation mgmt * suspend or unsuspend users * workspace mangement * manage chats * manage chats * add Support for admin system settings for users to delete workspaces and limit chats per user * fix issue ith system var update app to lazy load invite page * cleanup and bug fixes * wrong method * update readme * update readme * update readme * bump version to 0.1.0
19 lines
349 B
JavaScript
19 lines
349 B
JavaScript
import { useContext } from "react";
|
|
import { AuthContext } from "../AuthContext";
|
|
|
|
// interface IStore {
|
|
// store: {
|
|
// user: {
|
|
// id: string;
|
|
// username: string | null;
|
|
// role: string;
|
|
// };
|
|
// };
|
|
// }
|
|
|
|
export default function useUser() {
|
|
const context = useContext(AuthContext);
|
|
|
|
return { ...context.store };
|
|
}
|