Precursor to scroll position history; Restoring Genius API; Settings services

This commit is contained in:
James Barnsley
2018-03-31 20:36:36 +13:00
parent 2b186e9ef7
commit 9ecddcc1b5
12 changed files with 26406 additions and 27319 deletions

27
src/js/components/Link.js Executable file
View File

@ -0,0 +1,27 @@
import React from 'react'
import { Link } from 'react-router'
export default class Link extends React.Component{
constructor(props){
super(props);
}
handleClick(e){
if (!this.props.retainScroll){
window.scrollTo(0, 0);
}
}
render(){
return (
<Link
onClick={e => this.handleClick(e)}
className={this.props.className ? this.props.className : null}
to={to}>
{this.props.children}
</Link>
);
}
}