Finished updating the reformatting of propTypes and set redux, intl functions to end of component
• Finished: - updating the reformatting of propTypes and set redux, intl functions to end of component • Removed: - Gif implementation
This commit is contained in:
@@ -7,30 +7,7 @@ import { meUsername } from '../../initial_state'
|
||||
import PopoverLayout from './popover_layout'
|
||||
import List from '../list'
|
||||
|
||||
const messages = defineMessages({
|
||||
profile: { id: 'account.profile', defaultMessage: 'Profile' },
|
||||
display: { id: 'display_options', defaultMessage: 'Display Options' },
|
||||
help: { id: 'getting_started.help', defaultMessage: 'Help' },
|
||||
settings: { id: 'settings', defaultMessage: 'Settings' },
|
||||
logout: { 'id': 'confirmations.logout.confirm', 'defaultMessage': 'Log out' },
|
||||
})
|
||||
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
onClosePopover() {
|
||||
dispatch(closePopover())
|
||||
},
|
||||
})
|
||||
|
||||
export default
|
||||
@injectIntl
|
||||
@connect(null, mapDispatchToProps)
|
||||
class NavSettingsPopover extends React.PureComponent {
|
||||
|
||||
static propTypes = {
|
||||
intl: PropTypes.object.isRequired,
|
||||
onClosePopover: PropTypes.func.isRequired,
|
||||
isXS: PropTypes.bool,
|
||||
}
|
||||
|
||||
handleOnClosePopover = () => {
|
||||
this.props.onClosePopover()
|
||||
@@ -69,4 +46,26 @@ class NavSettingsPopover extends React.PureComponent {
|
||||
</PopoverLayout>
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const messages = defineMessages({
|
||||
profile: { id: 'account.profile', defaultMessage: 'Profile' },
|
||||
display: { id: 'display_options', defaultMessage: 'Display Options' },
|
||||
help: { id: 'getting_started.help', defaultMessage: 'Help' },
|
||||
settings: { id: 'settings', defaultMessage: 'Settings' },
|
||||
logout: { 'id': 'confirmations.logout.confirm', 'defaultMessage': 'Log out' },
|
||||
})
|
||||
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
onClosePopover() {
|
||||
dispatch(closePopover())
|
||||
},
|
||||
})
|
||||
|
||||
NavSettingsPopover.propTypes = {
|
||||
intl: PropTypes.object.isRequired,
|
||||
onClosePopover: PropTypes.func.isRequired,
|
||||
isXS: PropTypes.bool,
|
||||
}
|
||||
|
||||
export default injectIntl(connect(null, mapDispatchToProps)(NavSettingsPopover))
|
||||
Reference in New Issue
Block a user