import { useMemo } from "react"; import { faBan } from "@fortawesome/free-solid-svg-icons"; import { useQuery } from "@tanstack/react-query"; import { EyeIcon } from "lucide-react"; import { EmptyState, Spinner, Tooltip } from "@app/components/v2"; import { Badge } from "@app/components/v3"; import { gatewaysQueryKeys, useGetIdentityKubernetesAuth } from "@app/hooks/api"; import { IdentityKubernetesAuthForm } from "@app/pages/organization/AccessManagementPage/components/OrgIdentityTab/components/IdentitySection/IdentityKubernetesAuthForm"; import { IdentityAuthFieldDisplay } from "./IdentityAuthFieldDisplay"; import { ViewAuthMethodProps } from "./types"; import { ViewIdentityContentWrapper } from "./ViewIdentityContentWrapper"; export const ViewIdentityKubernetesAuthContent = ({ identityId, handlePopUpToggle, handlePopUpOpen, onDelete, popUp }: ViewAuthMethodProps) => { const { data: gateways } = useQuery(gatewaysQueryKeys.list()); const { data, isPending } = useGetIdentityKubernetesAuth(identityId); const selectedGateway = useMemo(() => { return gateways?.find((gateway) => gateway.id === data?.gatewayId) || null; }, [gateways, data?.gatewayId]); if (isPending) { return (
Not set
)}