Settle on serif font, add scroll to top component

This commit is contained in:
2019-08-30 06:22:26 +00:00
parent 23cdbc9292
commit 20a9d9d452
17 changed files with 42 additions and 52 deletions

View File

@@ -30,16 +30,13 @@ export const clearStorage = () => {
};
export class ToggleDot extends React.Component {
scrollTop() {
window.scrollTo(0, 0);
}
render() {
const id = this.props.id;
const article = this.props.article;
return (
<div className='toggleDot'>
<div className='button'>
<Link to={'/' + id + (article ? '/a' : '')} onClick={this.scrollTop} replace>
<Link to={'/' + id + (article ? '/a' : '')}>
<img src={Switch} />
</Link>
</div>