Thibaut Boustany
7 years ago
6 changed files with 75 additions and 2 deletions
@ -0,0 +1,32 @@ |
|||||
|
// @flow
|
||||
|
|
||||
|
import { PureComponent } from 'react' |
||||
|
import { connect } from 'react-redux' |
||||
|
|
||||
|
import { openModal } from 'reducers/modals' |
||||
|
import { MODAL_RELEASES_NOTES } from 'config/constants' |
||||
|
|
||||
|
type Props = { |
||||
|
openModal: Function, |
||||
|
} |
||||
|
|
||||
|
const mapDispatchToProps = { |
||||
|
openModal, |
||||
|
} |
||||
|
|
||||
|
class UpdateInstalled extends PureComponent<Props> { |
||||
|
componentDidMount() { |
||||
|
const { openModal } = this.props |
||||
|
|
||||
|
openModal(MODAL_RELEASES_NOTES, 'blah') |
||||
|
} |
||||
|
|
||||
|
render() { |
||||
|
return null |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
export default connect( |
||||
|
null, |
||||
|
mapDispatchToProps, |
||||
|
)(UpdateInstalled) |
@ -0,0 +1,17 @@ |
|||||
|
// @flow
|
||||
|
|
||||
|
import React, { PureComponent, Fragment } from 'react' |
||||
|
|
||||
|
import UpdateDownloaded from './UpdateDownloaded' |
||||
|
import UpdateInstalled from './UpdateInstalled' |
||||
|
|
||||
|
export default class UpdateNotifier extends PureComponent<{}> { |
||||
|
render() { |
||||
|
return ( |
||||
|
<Fragment> |
||||
|
<UpdateDownloaded /> |
||||
|
<UpdateInstalled /> |
||||
|
</Fragment> |
||||
|
) |
||||
|
} |
||||
|
} |
@ -0,0 +1,22 @@ |
|||||
|
// @flow
|
||||
|
import React, { PureComponent } from 'react' |
||||
|
import { MODAL_RELEASES_NOTES } from 'config/constants' |
||||
|
import Modal, { ModalBody, ModalTitle, ModalContent } from 'components/base/Modal' |
||||
|
|
||||
|
class ReleaseNotes extends PureComponent<*, *> { |
||||
|
render() { |
||||
|
return ( |
||||
|
<Modal |
||||
|
name={MODAL_RELEASES_NOTES} |
||||
|
render={({ data, onClose }) => ( |
||||
|
<ModalBody onClose={onClose}> |
||||
|
<ModalTitle>Release Notes</ModalTitle> |
||||
|
<ModalContent>{data}</ModalContent> |
||||
|
</ModalBody> |
||||
|
)} |
||||
|
/> |
||||
|
) |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
export default ReleaseNotes |
Loading…
Reference in new issue