rag / frontend /src /hooks /useUser.js
gaojintao01
Add files using Git LFS
f8b5d42
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 };
}