- {isLoading ? (
-
- {__("Loading organizations...")}
-
- ) : filteredOrganizations.length === 0 ? (
-
- {__("No organizations found")}
-
- ) : (
- filteredOrganizations.map((organization) => {
- const isAuthenticated =
- organization.authStatus === "authenticated";
- const isExpired = organization.authStatus === "expired";
- const needsAuth = organization.authStatus === "unauthenticated";
-
- const targetUrl = isAuthenticated
- ? `/organizations/${organization.id}`
- : organization.loginUrl;
-
- const isSAMLUrl = targetUrl.includes("/connect/saml/");
-
- // Use organization endpoint for all logos for consistency
- const logoUrl = organization.logoUrl;
-
- return (
-
- {isSAMLUrl ? (
-
-
- {organization.name}
- {isAuthenticated && (
-
- )}
- {isExpired && (
-
- )}
- {needsAuth && (
-
- )}
-
- ) : (
-
-
- {organization.name}
- {isAuthenticated && (
-
- )}
- {isExpired && (
-
- )}
- {needsAuth && (
-
- )}
-
- )}
-
- );
- })
- )}
-
-