on cb4ec11 help sign in
bridge/src/common/components/AppNavigation.js
43 lines 849 B history raw
1import React from 'react';
3class AppNavigation extends React.Component {
4 constructor(props) {
5 super(props)
7 this.navigate = this.navigate.bind(this)
8 }
10 navigate() {
11 let appView;
12 if (this.props.appView === "bridge") appView = "walletgen"
13 if (this.props.appView === "walletgen") appView = "bridge"
15 this.props.setView(appView)
16 }
18 render() {
19 let buttonText;
20 if (this.props.appView === "bridge") buttonText = "Go to Walletgen"
21 if (this.props.appView === "walletgen") buttonText = "Go to Bridge"
23 let style = {
24 position: "fixed",
25 bottom: "10px",
26 right: "10px",
27 "text-decoration": "underline",
28 cursor: "pointer"
29 }
31 return (
32 <span
33 style={style}
34 onClick={this.navigate}>
35 {buttonText}
36 </span>
37 )
38 }
41export {
42 AppNavigation