anything-llm/frontend/src/hooks/useUser.js
Timothy Carambat f48e6b1a3e
chore: add @ as alias for frontend root (#414)
* chore: add @ as alias for frontend root

* fix: remove bad tag
2023-12-07 09:09:01 -08:00

19 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 };
}