aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkumavis <aaron@kumavis.me>2016-07-01 12:46:19 +0800
committerkumavis <aaron@kumavis.me>2016-07-01 12:46:19 +0800
commit5a917431d8ce2587284d938b6135a62bff6e17d1 (patch)
tree993ec3b996ed52c155e09d21ed1d74dffba9f6a8
parentcd21a4b699fd692800e0fb6ef961d98e786925b6 (diff)
downloadtangerine-wallet-browser-5a917431d8ce2587284d938b6135a62bff6e17d1.tar.gz
tangerine-wallet-browser-5a917431d8ce2587284d938b6135a62bff6e17d1.tar.zst
tangerine-wallet-browser-5a917431d8ce2587284d938b6135a62bff6e17d1.zip
disclaimer - render via react-markdown
-rw-r--r--package.json1
-rw-r--r--ui/app/first-time/disclaimer.js12
2 files changed, 11 insertions, 2 deletions
diff --git a/package.json b/package.json
index 2aca46948..f46d41431 100644
--- a/package.json
+++ b/package.json
@@ -54,6 +54,7 @@
"react-addons-css-transition-group": "^15.0.2",
"react-dom": "^15.0.2",
"react-hyperscript": "^2.2.2",
+ "react-markdown": "^2.3.0",
"react-redux": "^4.4.5",
"react-tooltip-component": "^0.3.0",
"readable-stream": "^2.1.2",
diff --git a/ui/app/first-time/disclaimer.js b/ui/app/first-time/disclaimer.js
index 4a9e234b1..929624814 100644
--- a/ui/app/first-time/disclaimer.js
+++ b/ui/app/first-time/disclaimer.js
@@ -3,6 +3,7 @@ const Component = require('react').Component
const h = require('react-hyperscript')
const connect = require('react-redux').connect
const actions = require('../actions')
+const ReactMarkdown = require('react-markdown')
const fs = require('fs')
const path = require('path')
const disclaimer = fs.readFileSync(path.join(__dirname, '..', '..', '..', 'USER_AGREEMENT.md')).toString()
@@ -36,14 +37,21 @@ DisclaimerScreen.prototype.render = function () {
h('div', {
style: {
- whiteSpace: 'pre-line',
+ // whiteSpace: 'pre-line',
background: 'rgb(235, 235, 235)',
height: '310px',
padding: '6px',
width: '80%',
overflowY: 'scroll',
},
- }, disclaimer),
+ }, [
+
+ h(ReactMarkdown, {
+ source: disclaimer,
+ skipHtml: true,
+ }),
+
+ ]),
h('button', {
style: { marginTop: '18px' },