Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import React from 'react'
import { get } from 'lodash'
import { compose } from 'recompose'
import { connect } from 'react-redux'
import styled from 'styled-components'
import { selectCurrentUser } from 'xpub-selectors'
import { BreadcrumbsHeader } from 'pubsweet-components-faraday/src/components'
import AccountDetails from './AccountDetails'
import LinkOrcID from './LinkOrcID'
import EmailNotifications from './EmailNotifications'
const UserProfilePage = ({ history, user }) => (
<Root>
<BreadcrumbsHeader
history={history}
info={get(user, 'email')}
showBack
title="Account Settings"
underlined
/>
<AccountDetails user={user} />
<EmailNotifications subscribed={get(user, 'subscription')} />
<LinkOrcID orcid={get(user, 'orcid')} />
</Root>
)
export default compose(
connect(state => ({
user: selectCurrentUser(state),
})),
)(UserProfilePage)
// #region styles
const Root = styled.div`
display: flex;
flex-direction: column;
margin: auto;
max-width: 60em;
`
// #endregion