Replacing all Link with custom Link that scrolls to the top (so we can detect forward vs backward navigation)

This commit is contained in:
James Barnsley
2018-10-24 21:34:41 +13:00
parent 42414b25d3
commit 0bafa7e97b
43 changed files with 265 additions and 118 deletions

View File

@ -1,6 +1,6 @@
import React from 'react';
import { Link } from 'react-router';
import {Link} from 'react-router';
export default class extends React.Component{
@ -18,7 +18,8 @@ export default class extends React.Component{
return (
<Link
onClick={e => this.handleClick(e)}
className={this.props.className ? this.props.className : null}
className={this.props.className ? this.props.className : null}
activeClassName={this.props.activeClassName}
to={this.props.to}>
{this.props.children}
</Link>