From a53546e503addb13ebd0a36eaeef3aaf4fc9f11d Mon Sep 17 00:00:00 2001 From: Yoshihiro OKUMURA Date: Mon, 13 May 2019 23:49:51 +0900 Subject: [PATCH] scroll to top if page url changed. --- src/App.tsx | 11 +++-------- src/components/AppRoot.tsx | 29 +++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 8 deletions(-) create mode 100644 src/components/AppRoot.tsx diff --git a/src/App.tsx b/src/App.tsx index 6ef9bb0..689c099 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,19 +1,14 @@ import React, { Component } from 'react'; import { BrowserRouter } from 'react-router-dom'; +import AppRoot from './components/AppRoot'; import './App.css'; -import Header from './components/Header'; -import Footer from './components/Footer'; -import Container from './components/Container'; - class App extends Component { render() { return ( -
- -