diff options
author | Renard | 2019-09-16 13:46:12 -0300 |
---|---|---|
committer | Renard | 2019-09-16 13:46:12 -0300 |
commit | 542d536dab627c9fd24ec0d440b0106d71153258 (patch) | |
tree | c25a9b904bac5df0f03568b98c22cd24f87feda9 /src | |
parent | c7fcf05857716e187c064d7ba21f27962015b71d (diff) | |
download | bai-client-542d536dab627c9fd24ec0d440b0106d71153258.tar.gz bai-client-542d536dab627c9fd24ec0d440b0106d71153258.tar.xz bai-client-542d536dab627c9fd24ec0d440b0106d71153258.zip |
Scroll to top view change
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() { |