feat(rbac): removed unused variables

This commit is contained in:
Akhil Mohan
2023-09-08 21:26:10 +05:30
parent 63ff669612
commit b023bb1df2
2 changed files with 2 additions and 4 deletions

View File

@@ -1,7 +1,6 @@
import { useState } from "react";
import { faEdit, faMagnifyingGlass, faPlus, faTrash } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { format } from "date-fns";
import { useNotificationContext } from "@app/components/context/Notifications/NotificationProvider";
import { OrgPermissionCan } from "@app/components/permissions";
@@ -90,7 +89,7 @@ export const OrgRoleTable = ({ isRolesLoading, roles = [], onSelectRole }: Props
<TBody>
{isRolesLoading && <TableSkeleton columns={4} innerKey="org-roles" />}
{roles?.map((role) => {
const { _id: id, name, createdAt, slug } = role;
const { _id: id, name, slug } = role;
const isNonMutatable = ["owner", "admin", "member"].includes(slug);
return (

View File

@@ -1,7 +1,6 @@
import { useState } from "react";
import { faEdit, faMagnifyingGlass, faPlus, faTrash } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { format } from "date-fns";
import { useNotificationContext } from "@app/components/context/Notifications/NotificationProvider";
import { ProjectPermissionCan } from "@app/components/permissions";
@@ -99,7 +98,7 @@ export const ProjectRoleList = ({ isRolesLoading, roles = [], onSelectRole }: Pr
<TBody>
{isRolesLoading && <TableSkeleton columns={4} innerKey="org-roles" />}
{roles?.map((role) => {
const { _id: id, name, createdAt, slug } = role;
const { _id: id, name, slug } = role;
const isNonMutatable = ["admin", "member", "viewer"].includes(slug);
return (