import React , { PureComponent } from "react";
import { Link } from 'react-router-dom';

import './nav.css'

class Index extends PureComponent{
  render(){
    const { NavMap , ...props } = this.props;
    let navRouter = NavMap && NavMap.map((item) => {
      return(
        <React.Fragment>
          {
            item.name ? (item.url ? 
            <Link to={item.url} className="color-grey-9 nav_Link" >{ item.name }</Link> 
            : 
            <span className="color-grey3">{ item.name }</span>)
            :""
          }
        </React.Fragment>
      )
    })
    return(
      <p {...props}>{ navRouter }</p>
    )
  }

}
export default Index;