mirror of
https://github.com/Mintplex-Labs/anything-llm.git
synced 2025-04-24 05:28:11 +00:00
18 lines
348 B
JavaScript
18 lines
348 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 };
|
|
}
|