@@ -8,41 +8,53 @@ export default class NavigationBar extends React.Component {
88 super ( props ) ;
99
1010 this . state = {
11-
11+ selectedTab : 'buckets'
1212 } ;
1313 }
14+
15+
16+ handleNavigation = ( selectedTab ) => {
17+ this . setState ( { selectedTab} ) ;
18+ this . props . onNavigation ( selectedTab ) ;
19+ }
1420
1521 render ( ) {
1622 return (
1723 < div className = "sticky-top justify-content-center" id = "" >
18- < div className = "selected row align-items-center navigation-item" >
24+ < div className = { " row align-items-center navigation-item " + ( this . state . selectedTab === 'buckets' && 'selected' ) } >
1925 < div className = "col" >
20- < div className = "row align-items-center justify-content-center" >
21- < FontAwesomeIcon icon = { faCloudDownloadAlt } size = "2x" />
22- </ div >
23- < div className = "row align-items-center justify-content-center" >
24- Buckets
25- </ div >
26+ < a onClick = { ( ) => this . handleNavigation ( 'buckets' ) } >
27+ < div className = "row align-items-center justify-content-center" >
28+ < FontAwesomeIcon icon = { faCloudDownloadAlt } size = "2x" />
29+ </ div >
30+ < div className = "row align-items-center justify-content-center" >
31+ Buckets
32+ </ div >
33+ </ a >
2634 </ div >
2735 </ div >
28- < div className = "row align-items-center navigation-item" >
36+ < div className = { "row align-items-center navigation-item " + ( this . state . selectedTab === 'history' && 'selected' ) } >
2937 < div className = "col" >
30- < div className = "row align-items-center justify-content-center" >
31- < FontAwesomeIcon icon = { faHistory } size = "2x" />
32- </ div >
33- < div className = "row align-items-center justify-content-center" >
34- History
35- </ div >
38+ < a onClick = { ( ) => this . handleNavigation ( 'history' ) } >
39+ < div className = "row align-items-center justify-content-center" >
40+ < FontAwesomeIcon icon = { faHistory } size = "2x" />
41+ </ div >
42+ < div className = "row align-items-center justify-content-center" >
43+ History
44+ </ div >
45+ </ a >
3646 </ div >
3747 </ div >
38- < div className = "row align-items-center navigation-item" >
48+ < div className = { "row align-items-center navigation-item " + ( this . state . selectedTab === 'settings' && 'selected' ) } >
3949 < div className = "col" >
40- < div className = "row align-items-center justify-content-center" >
41- < FontAwesomeIcon icon = { faCogs } size = "2x" />
42- </ div >
43- < div className = "row align-items-center justify-content-center" >
44- Settings
45- </ div >
50+ < a onClick = { ( ) => this . handleNavigation ( 'settings' ) } >
51+ < div className = "row align-items-center justify-content-center" >
52+ < FontAwesomeIcon icon = { faCogs } size = "2x" />
53+ </ div >
54+ < div className = "row align-items-center justify-content-center" >
55+ Settings
56+ </ div >
57+ </ a >
4658 </ div >
4759 </ div >
4860 </ div >
0 commit comments