deprecate RouterListLink
This commit is contained in:
parent
5a94ee35e6
commit
b2e67e0125
1 changed files with 2 additions and 15 deletions
17
src/Nav.js
17
src/Nav.js
|
|
@ -8,19 +8,6 @@ import { Row } from './skeleton';
|
|||
|
||||
|
||||
class ListLink extends Component {
|
||||
render () {
|
||||
let icon = null;
|
||||
if (this.props.icon) {
|
||||
icon = <Icon name={ this.props.icon } />
|
||||
}
|
||||
|
||||
return (
|
||||
<li> <a href={ this.props.href }>{ icon } { this.props.name }</a> </li>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class RouterListLink extends Component {
|
||||
render () {
|
||||
let icon = null;
|
||||
if (this.props.icon) {
|
||||
|
|
@ -54,7 +41,7 @@ class NavList extends Component {
|
|||
|
||||
if (page.parent == null) {
|
||||
let href = "/" + slug;
|
||||
links.push(<RouterListLink
|
||||
links.push(<ListLink
|
||||
name={page.title}
|
||||
href={href}
|
||||
key={slug}
|
||||
|
|
@ -69,7 +56,7 @@ class NavList extends Component {
|
|||
return (
|
||||
<Row>
|
||||
<ul>
|
||||
<RouterListLink name="Home" href="/" />
|
||||
<ListLink name="Home" href="/" />
|
||||
{ this.state.pageLinks }
|
||||
<ListLink name="RSS" href="/rss.xml" icon="rss-square" />
|
||||
</ul>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue