Add CurrentUser context and use it in documents
Signed-off-by: Émile Ré <nemile.re@gmail.com>
This commit is contained in:
14
apps/console/src/providers/CurrentUser.tsx
Normal file
14
apps/console/src/providers/CurrentUser.tsx
Normal file
@@ -0,0 +1,14 @@
|
||||
import { Role } from "@probo/helpers";
|
||||
import { createContext } from "react";
|
||||
|
||||
type CurrentUserContextValue = {
|
||||
email: string;
|
||||
fullName: string;
|
||||
role: Role;
|
||||
};
|
||||
|
||||
export const CurrentUser = createContext<CurrentUserContextValue>({
|
||||
email: "",
|
||||
fullName: "",
|
||||
role: Role.VIEWER,
|
||||
});
|
||||
Reference in New Issue
Block a user