Add CurrentUser context and use it in documents

Signed-off-by: Émile Ré <nemile.re@gmail.com>
This commit is contained in:
Émile Ré
2026-01-02 16:22:11 +01:00
committed by Bryan Frimin
parent 26371857e9
commit ecf27751ac
13 changed files with 139 additions and 194 deletions

View 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,
});