overleaf/services/web/frontend/js/features/settings/components/emails/row.tsx
Timothée Alby d3dc83b776 Merge pull request #7722 from overleaf/ii-add-email-ui-without-affiliations
Add emails without affiliations

GitOrigin-RevId: 13d53b604f8d7cf0f36b2c5caea85ecc15cfc6d5
2022-04-26 08:04:12 +00:00

36 lines
916 B
TypeScript

import { UserEmailData } from '../../../../../../types/user-email'
import { Row, Col } from 'react-bootstrap'
import Email from './email'
import InstitutionAndRole from './institution-and-role'
import EmailCell from './cell'
import Actions from './actions'
type EmailsRowProps = {
userEmailData: UserEmailData
}
function EmailsRow({ userEmailData }: EmailsRowProps) {
return (
<Row>
<Col md={4}>
<EmailCell>
<Email userEmailData={userEmailData} />
</EmailCell>
</Col>
<Col md={4}>
{userEmailData.affiliation?.institution && (
<EmailCell>
<InstitutionAndRole userEmailData={userEmailData} />
</EmailCell>
)}
</Col>
<Col md={4}>
<EmailCell className="text-md-right">
<Actions userEmailData={userEmailData} />
</EmailCell>
</Col>
</Row>
)
}
export default EmailsRow