overleaf/services/web/frontend/js/features/group-management/components/managed-users/sso-status.tsx
Davinder Singh 82513340c1 Merge pull request #15220 from overleaf/ds-bug-fix-group-sso-emails
Group SSO - Adding a bug fix for sending emails.

GitOrigin-RevId: 54d1d0a0ebcb1c0767ae9fc24d81a23e1568b7fb
2023-10-18 08:04:45 +00:00

41 lines
1.1 KiB
TypeScript

import { useTranslation } from 'react-i18next'
import { User } from '../../../../../../types/group-management/user'
import MaterialIcon from '@/shared/components/material-icon'
type SSOStatusProps = {
user: User
}
export default function SSOStatus({ user }: SSOStatusProps) {
const { t } = useTranslation()
return (
<span>
{user.invite ? (
<span className="security-state-invite-pending">
<MaterialIcon
type="schedule"
category="outlined"
accessibilityLabel={t('pending_invite')}
/>
&nbsp; {t('sso')}
</span>
) : (
<>
{user.enrollment?.sso ? (
<span className="security-state-managed">
<MaterialIcon type="check" accessibilityLabel={t('sso_linked')} />
&nbsp; {t('sso')}
</span>
) : (
<span className="security-state-not-managed">
<MaterialIcon
type="close"
accessibilityLabel={t('sso_unlinked')}
/>
&nbsp; {t('sso')}
</span>
)}
</>
)}
</span>
)
}