diff options
author | Whymarrh Whitby <whymarrh.whitby@gmail.com> | 2019-01-31 01:14:30 +0800 |
---|---|---|
committer | Whymarrh Whitby <whymarrh.whitby@gmail.com> | 2019-02-05 20:19:55 +0800 |
commit | f3a7054f6b25a43b55bb6bda77b084171d611d12 (patch) | |
tree | bd657661a3f107666f67c40b6b448b8210f8c7b7 /ui/app/components/ui-migration-annoucement/ui-migration-annoucement.component.js | |
parent | c52ba96b85998f34bfb034f801556f4c89b8b6ba (diff) | |
download | tangerine-wallet-browser-f3a7054f6b25a43b55bb6bda77b084171d611d12.tar tangerine-wallet-browser-f3a7054f6b25a43b55bb6bda77b084171d611d12.tar.gz tangerine-wallet-browser-f3a7054f6b25a43b55bb6bda77b084171d611d12.tar.bz2 tangerine-wallet-browser-f3a7054f6b25a43b55bb6bda77b084171d611d12.tar.lz tangerine-wallet-browser-f3a7054f6b25a43b55bb6bda77b084171d611d12.tar.xz tangerine-wallet-browser-f3a7054f6b25a43b55bb6bda77b084171d611d12.tar.zst tangerine-wallet-browser-f3a7054f6b25a43b55bb6bda77b084171d611d12.zip |
Add announcement for users migrated to the new UI
Diffstat (limited to 'ui/app/components/ui-migration-annoucement/ui-migration-annoucement.component.js')
-rw-r--r-- | ui/app/components/ui-migration-annoucement/ui-migration-annoucement.component.js | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/ui/app/components/ui-migration-annoucement/ui-migration-annoucement.component.js b/ui/app/components/ui-migration-annoucement/ui-migration-annoucement.component.js new file mode 100644 index 000000000..7a4124972 --- /dev/null +++ b/ui/app/components/ui-migration-annoucement/ui-migration-annoucement.component.js @@ -0,0 +1,33 @@ +import PropTypes from 'prop-types' +import React, {PureComponent} from 'react' + +export default class UiMigrationAnnouncement extends PureComponent { + static contextTypes = { + t: PropTypes.func.isRequired, + } + + static defaultProps = { + shouldShowAnnouncement: true, + }; + + static propTypes = { + onClose: PropTypes.func.isRequired, + shouldShowAnnouncement: PropTypes.bool, + } + + render () { + const { t } = this.context + const { onClose, shouldShowAnnouncement } = this.props + + if (!shouldShowAnnouncement) { + return null + } + + return ( + <div className="ui-migration-announcement"> + <p>{t('uiMigrationAnnouncement')}</p> + <p onClick={onClose}>{t('close')}</p> + </div> + ) + } +} |