add react-router

This commit is contained in:
horhik 2020-05-25 02:28:47 +03:00
parent ea01e2f53b
commit c5d14c2835
7 changed files with 29 additions and 4 deletions

View file

View file

@ -0,0 +1,12 @@
import React from 'react'
import {connect} from 'react-redux'
const NavHeader = props => {
return (
<nav>
</nav>
)
}
export default connect()(NavHeader)

View file

@ -0,0 +1,12 @@
import React from 'react'
import {Link} from 'react-router-dom'
import connect from 'react-redux'
import asciiWord from "../../functions/ascii-word";
const PageLink = props => {
return (
<Link to={props.src}>{asciiWord(props.name)}</Link>
)
}
export default PageLink

View file

@ -1,18 +1,19 @@
import React from 'react'
import asciiWord from "../../functions/ascii-word";
import {Link} from "react-router-dom";
const PageLinks = props => {
return(
<ul className={'page-list'}>
<li className={'page-link'}>
<a href="#portfolio">
<Link to={'/portfolio'}>
{asciiWord('Portfolio')}
</a>
</Link>
</li>
<li className={'page-link'}>
<a href="#blog">
<Link to={'/blog'}>
{asciiWord('Blog')}
</a>
</Link>
</li>
</ul>
)

View file

View file

View file