aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorFrankie <frankie.pangilinan@consensys.net>2016-08-27 02:30:07 +0800
committerFrankie <frankie.pangilinan@consensys.net>2016-08-27 02:30:07 +0800
commitae3358666014e4c302284e7ef760ce0d24cd7094 (patch)
treed7763ffba381fc6873021ad6423c3422e0b42ebf /ui
parent547894ed391f2d258c46ff382d4b211d18d81a7b (diff)
downloadtangerine-wallet-browser-ae3358666014e4c302284e7ef760ce0d24cd7094.tar
tangerine-wallet-browser-ae3358666014e4c302284e7ef760ce0d24cd7094.tar.gz
tangerine-wallet-browser-ae3358666014e4c302284e7ef760ce0d24cd7094.tar.bz2
tangerine-wallet-browser-ae3358666014e4c302284e7ef760ce0d24cd7094.tar.lz
tangerine-wallet-browser-ae3358666014e4c302284e7ef760ce0d24cd7094.tar.xz
tangerine-wallet-browser-ae3358666014e4c302284e7ef760ce0d24cd7094.tar.zst
tangerine-wallet-browser-ae3358666014e4c302284e7ef760ce0d24cd7094.zip
make the back button its own function
Diffstat (limited to 'ui')
-rw-r--r--ui/app/app.js43
1 files changed, 22 insertions, 21 deletions
diff --git a/ui/app/app.js b/ui/app/app.js
index 6dbfbb86b..70a6fcd64 100644
--- a/ui/app/app.js
+++ b/ui/app/app.js
@@ -300,28 +300,29 @@ App.prototype.renderDropdown = function () {
}),
])
}
+App.prototype.renderBackButton = function (style, justArrow = false) {
+ var props = this.props
+ return (
+ h('.flex-row', {
+ key: 'leftArrow',
+ transForward: false,
+ style: style,
+ onClick: () => props.dispatch(actions.goBackToInitView()),
+ }, [
+ h('i.fa.fa-arrow-left.cursor-pointer'),
+ justArrow ? null : h('div.cursor-pointer', {
+ style: {
+ marginLeft: '3px',
+ },
+ onClick: () => props.dispatch(actions.goBackToInitView()),
+ }, 'BACK'),
+ ])
+ )
+}
App.prototype.renderBackToInitButton = function () {
var props = this.props
var button = null
- var backButton = function (style, justArrow = false) {
- return (
- h('.flex-row', {
- key: 'leftArrow',
- transForward: false,
- style: style,
- onClick: () => props.dispatch(actions.goBackToInitView()),
- }, [
- h('i.fa.fa-arrow-left.cursor-pointer'),
- justArrow ? null : h('div.cursor-pointer', {
- style: {
- marginLeft: '3px',
- },
- onClick: () => props.dispatch(actions.goBackToInitView()),
- }, 'BACK'),
- ])
- )
- }
if (!props.isUnlocked) {
if (props.currentView.name === 'InitMenu') {
button = props.forgottenPassword ? h('.flex-row', {
@@ -357,7 +358,7 @@ App.prototype.renderBackToInitButton = function () {
fontFamily: 'Montserrat Bold',
color: 'rgb(174, 174, 174)',
}
- return backButton(style, true)
+ return this.renderBackButton(style, true)
case 'restoreVault':
style = {
position: 'absolute',
@@ -367,7 +368,7 @@ App.prototype.renderBackToInitButton = function () {
fontFamily: 'Montserrat Bold',
color: 'rgb(174, 174, 174)',
}
- return backButton(style, true)
+ return this.renderBackButton(style, true)
default:
style = {
position: 'absolute',
@@ -379,7 +380,7 @@ App.prototype.renderBackToInitButton = function () {
width: '71.969px',
alignItems: 'flex-end',
}
- return backButton(style)
+ return this.renderBackButton(style)
}
}
}