mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-15 15:41:27 +00:00
feat(rbac): resolved merge conflict
This commit is contained in:
@@ -12,11 +12,10 @@ type Props = {
|
||||
const ProjectPermissionContext = createContext<null | TProjectPermission>(null);
|
||||
|
||||
export const ProjectPermissionProvider = ({ children }: Props): JSX.Element => {
|
||||
const { currentWorkspace } = useWorkspace();
|
||||
const { currentWorkspace, isLoading: isWsLoading } = useWorkspace();
|
||||
const workspaceId = currentWorkspace?._id || "";
|
||||
const { data: permission, isLoading } = useGetUserProjectPermissions({ workspaceId });
|
||||
|
||||
console.log(workspaceId);
|
||||
if (!permission && currentWorkspace) {
|
||||
return (
|
||||
<div className="flex items-center justify-center w-screen h-screen bg-bunker-800">
|
||||
@@ -25,7 +24,7 @@ export const ProjectPermissionProvider = ({ children }: Props): JSX.Element => {
|
||||
);
|
||||
}
|
||||
|
||||
if (isLoading && workspaceId) {
|
||||
if ((isLoading && currentWorkspace) || isWsLoading) {
|
||||
return (
|
||||
<div className="flex items-center justify-center w-screen h-screen bg-bunker-800">
|
||||
<img
|
||||
|
||||
Reference in New Issue
Block a user