on master help sign in
- Make AppNavigation fixed to bottom right
3360534Chris Johnson
src/Bridge.js−4
@@ -287,10 +287,6 @@ class Bridge extends React.Component {
287 </Col>
287 </Col>
288 </Row>
288 </Row>
289 </Container>
289 </Container>
290−
291− <AppNavigation
292− setView={this.props.setView}
293− appView={this.props.appView} />
294 </React.Fragment>
290 </React.Fragment>
295 )
291 )
296 }
292 }
src/Root.js+5
@@ -5,6 +5,7 @@ import ReactDOM from 'react-dom'
5
5
6import Bridge from './Bridge'
6import Bridge from './Bridge'
7import Walletgen from './walletgen/Walletgen'
7import Walletgen from './walletgen/Walletgen'
8+import { AppNavigation } from './components/AppNavigation'
8
9
9import './style/index.css'
10import './style/index.css'
10import './walletgen/styles/index.css'
11import './walletgen/styles/index.css'
@@ -64,6 +65,10 @@ class Root extends React.Component {
64 return (
65 return (
65 <React.Fragment>
66 <React.Fragment>
66 {appComponent}
67 {appComponent}
68+ <AppNavigation
69+ setView={this.setView}
70+ appView={this.state.appView}
71+ />
67 </React.Fragment>
72 </React.Fragment>
68 )
73 )
69 }
74 }
src/components/AppNavigation.js+5−4
@@ -21,18 +21,19 @@ class AppNavigation extends React.Component {
21 if (this.props.appView === "walletgen") buttonText = "Go to Bridge"
21 if (this.props.appView === "walletgen") buttonText = "Go to Bridge"
22
22
23 let style = {
23 let style = {
24− position: "absolute",
24+ position: "fixed",
25− top: "10px",
25+ bottom: "10px",
26 right: "10px"
26 right: "10px"
27 }
27 }
28
28
29 return (
29 return (
30− <button
30+ <a
31+ href="javascript:void(0)"
31 type="button"
32 type="button"
32 style={style}
33 style={style}
33 onClick={this.navigate}>
34 onClick={this.navigate}>
34 {buttonText}
35 {buttonText}
35− </button>
36+ </a>
36 )
37 )
37 }
38 }
38}
39}
src/walletgen/Walletgen.js−3
@@ -142,9 +142,6 @@ class Walletgen extends React.Component {
142 setGlobalState={ this.setGlobalState }
142 setGlobalState={ this.setGlobalState }
143 />
143 />
144 </main>
144 </main>
145− <AppNavigation
146− setView={this.props.setView}
147− appView={this.props.appView} />
148 </React.Fragment>
145 </React.Fragment>
149 );
146 );
150 };
147 };