jonahkh
2020-05-29 e8b43eebd832e5ef41b3a077e824d96b6c1facfb
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
import React from 'react';
import {
    Nav,
    NavItem,
    NavList,
} from '@patternfly/react-core';
 
import { Link} from "react-router-dom";
 
 
 
class NavDefaultList extends React.Component {
    render() {
        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>
                    <NavItem id="news" isActive={window.location.pathname.endsWith("/news")}>
                        <Link to="/news" >News</Link>
                    </NavItem>
                </NavList>
            </Nav>
        );
    }
}
 
export default NavDefaultList;