Pablo Solar VilariƱo
2020-06-19 49a69db8fa634d24fc03f35cb8589e87c260fa1f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import React from 'react';
import {
    Nav,
    NavItem,
    NavList,
} from '@patternfly/react-core';
 
import { Link} from "react-router-dom";
 
 
 
class NavDefaultList extends React.Component {
    render() {
        var enableNews = process.env.REACT_APP_NEWS_ENABLED
        return (
            <Nav onSelect={this.onSelect} theme="dark">
                <NavList>
                    <NavItem id="home" isActive={window.location.pathname.endsWith("/")}>
                        <Link to="/">Home</Link>
                    </NavItem>
                    <NavItem id="historical_Data" isActive={window.location.pathname.endsWith("/history")}>
                        <Link to="/history" >Historical Data</Link>
                    </NavItem>
                    <NavItem id="exchange" isActive={window.location.pathname.endsWith("/exchange")}>
                        <Link to="/exchange" >Exchange</Link>
                    </NavItem>
                    {enableNews &&
                    <NavItem id="news" isActive={window.location.pathname.endsWith("/news")}>
                        <Link to="/news" >News</Link>
                    </NavItem>}
                </NavList>
            </Nav>
        );
    }
}
 
export default NavDefaultList;