mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
42 lines
1.1 KiB
TypeScript
42 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')}
|
||
|
/>
|
||
|
{t('sso')}
|
||
|
</span>
|
||
|
) : (
|
||
|
<>
|
||
|
{user.enrollment?.sso ? (
|
||
|
<span className="security-state-managed">
|
||
|
<MaterialIcon type="check" accessibilityLabel={t('sso_linked')} />
|
||
|
{t('sso')}
|
||
|
</span>
|
||
|
) : (
|
||
|
<span className="security-state-not-managed">
|
||
|
<MaterialIcon
|
||
|
type="close"
|
||
|
accessibilityLabel={t('sso_unlinked')}
|
||
|
/>
|
||
|
{t('sso')}
|
||
|
</span>
|
||
|
)}
|
||
|
</>
|
||
|
)}
|
||
|
</span>
|
||
|
)
|
||
|
}
|