Lint and move redirectSSO into controller

This commit is contained in:
Tuan Dang
2023-07-21 17:54:09 +07:00
parent fd3cf70e13
commit 75e90201c0
6 changed files with 26 additions and 27 deletions
@@ -1,19 +1,21 @@
import { Fragment } from "react"
import { Tab } from "@headlessui/react"
import { OrgAuthTab } from "../OrgAuthTab";
import { OrgGeneralTab } from "../OrgGeneralTab";
import { useUser, useOrganization } from "@app/context";
import { useOrganization,useUser } from "@app/context";
import {
useGetOrgUsers
} from "@app/hooks/api";
import { OrgAuthTab } from "../OrgAuthTab";
import { OrgGeneralTab } from "../OrgGeneralTab";
export const OrgTabGroup = () => {
const { currentOrg } = useOrganization();
const { user } = useUser();
const { data } = useGetOrgUsers(currentOrg?._id ?? "");
const isRoleSufficient = data?.some((orgUser) => {
return orgUser.role !== 'member' && orgUser.user._id === user._id;
return orgUser.role !== "member" && orgUser.user._id === user._id;
});
const tabs = [