import { Trans } from '@lingui/macro'; import React, { PureComponent } from 'react'; import { selectors } from '@grafana/e2e-selectors'; import { Button, LoadingPlaceholder } from '@grafana/ui'; import { UserDTO, UserOrg } from 'app/types'; export interface Props { user: UserDTO | null; orgs: UserOrg[]; isLoading: boolean; setUserOrg: (org: UserOrg) => void; } export class UserOrganizations extends PureComponent { render() { const { isLoading, orgs, user } = this.props; if (isLoading) { return ; } if (orgs.length === 0) { return null; } return (

Organizations

{orgs.map((org: UserOrg, index) => { return ( ); })}
Name Role
{org.name} {org.role} {org.orgId === user?.orgId ? ( ) : ( )}
); } } export default UserOrganizations;