diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Board.js | 8 | ||||
-rw-r--r-- | src/Home.js | 1 | ||||
-rw-r--r-- | src/Thread.js | 1 |
3 files changed, 4 insertions, 6 deletions
diff --git a/src/Board.js b/src/Board.js index e5997bc..31174e2 100644 --- a/src/Board.js +++ b/src/Board.js @@ -35,12 +35,8 @@ class Board extends Component { this.setState({ error: resource }); } this.setState({ isLoaded: true, threadList: resource["threads"] }); - }) - .catch(console.error); - } - - componentWillUnmount() { - console.log("will unmount"); + }); + window.scrollTo(0, 0); } componentDidUpdate(prevProps) { diff --git a/src/Home.js b/src/Home.js index 4544cf2..665a7a5 100644 --- a/src/Home.js +++ b/src/Home.js @@ -47,6 +47,7 @@ class Home extends Component { isLoaded: true }); }); + window.scrollTo(0, 0); } render() { diff --git a/src/Thread.js b/src/Thread.js index f23c081..3a964b5 100644 --- a/src/Thread.js +++ b/src/Thread.js @@ -50,6 +50,7 @@ class Thread extends Component { }); this.lastTime = resource.time; }); + window.scrollTo(0, 0); } componentWillUnmount() { |