aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/notice.js
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2016-12-21 05:53:14 +0800
committerDan Finlay <dan@danfinlay.com>2016-12-21 07:24:08 +0800
commit931ae5f64a233b472c3dada8aa6af77e0bffad5e (patch)
treec5223496a95e474d90df1565a858f3715240c274 /ui/app/notice.js
parent674b2689826c770092a3dfee7fe76fb83c0b444a (diff)
downloadtangerine-wallet-browser-931ae5f64a233b472c3dada8aa6af77e0bffad5e.tar
tangerine-wallet-browser-931ae5f64a233b472c3dada8aa6af77e0bffad5e.tar.gz
tangerine-wallet-browser-931ae5f64a233b472c3dada8aa6af77e0bffad5e.tar.bz2
tangerine-wallet-browser-931ae5f64a233b472c3dada8aa6af77e0bffad5e.tar.lz
tangerine-wallet-browser-931ae5f64a233b472c3dada8aa6af77e0bffad5e.tar.xz
tangerine-wallet-browser-931ae5f64a233b472c3dada8aa6af77e0bffad5e.tar.zst
tangerine-wallet-browser-931ae5f64a233b472c3dada8aa6af77e0bffad5e.zip
Make notices confirmation configurable
- Confirm button will now dismiss the lost accounts array.
Diffstat (limited to 'ui/app/notice.js')
-rw-r--r--ui/app/notice.js18
1 files changed, 6 insertions, 12 deletions
diff --git a/ui/app/notice.js b/ui/app/notice.js
index 3c2c746f2..92c171c4d 100644
--- a/ui/app/notice.js
+++ b/ui/app/notice.js
@@ -7,13 +7,7 @@ const actions = require('./actions')
const linker = require('extension-link-enabler')
const findDOMNode = require('react-dom').findDOMNode
-module.exports = connect(mapStateToProps)(Notice)
-
-function mapStateToProps (state) {
- return {
- lastUnreadNotice: state.metamask.lastUnreadNotice,
- }
-}
+module.exports = Notice
inherits(Notice, Component)
function Notice () {
@@ -21,9 +15,8 @@ function Notice () {
}
Notice.prototype.render = function () {
- const props = this.props
- const title = props.lastUnreadNotice.title
- const date = props.lastUnreadNotice.date
+ const { notice, onConfirm } = this.props
+ const { title, date, body } = notice
return (
h('.flex-column.flex-center.flex-grow', [
@@ -59,6 +52,7 @@ Notice.prototype.render = function () {
.markdown {
overflow-x: hidden;
}
+
.markdown h1, .markdown h2, .markdown h3 {
margin: 10px 0;
font-weight: bold;
@@ -92,13 +86,13 @@ Notice.prototype.render = function () {
},
}, [
h(ReactMarkdown, {
- source: props.lastUnreadNotice.body,
+ source: body,
skipHtml: true,
}),
]),
h('button', {
- onClick: () => props.dispatch(actions.markNoticeRead(props.lastUnreadNotice)),
+ onClick: onConfirm,
style: {
marginTop: '18px',
},