import { ShieldCheck } from "lucide-react"; import { getLinkedAccountProviderStates } from "@/ee/features/permissionSyncing/actions" import { Card, CardContent } from "@/components/ui/card"; import { LinkedAccountProviderCard } from "./linkedAccountProviderCard"; import { LogoutEscapeHatch } from "@/app/components/logoutEscapeHatch"; import { isServiceError } from "@/lib/utils"; export async function LinkedAccountsSettings() { const linkedAccountProviderStates = await getLinkedAccountProviderStates(); if (isServiceError(linkedAccountProviderStates)) { return

An error occurred

{typeof linkedAccountProviderStates.message === 'string' ? linkedAccountProviderStates.message : "A server error occurred while checking your account status. Please try again or contact support."}

} return (

Linked Accounts

Manage your linked account integrations for permission syncing.

{linkedAccountProviderStates.length === 0 ? (

No integration providers configured

Contact your administrator to configure integration providers for your organization.

) : (
{linkedAccountProviderStates .sort((a, b) => (b.required ? 1 : 0) - (a.required ? 1 : 0)) .map((state) => { return ( ); })}
)}
); }