aboutsummaryrefslogtreecommitdiff
path: root/src/containers/Page/Page.tsx
diff options
context:
space:
mode:
authorEugene Sokolov <eug-vs@keemail.me>2020-10-08 20:40:45 +0300
committerGitHub <noreply@github.com>2020-10-08 20:40:45 +0300
commitbdb4d194307c9755c2083c1a11bb876abebcb6de (patch)
tree9aff25b0bd0b47127b66e4db4818468ec70719bf /src/containers/Page/Page.tsx
parent45b4094c02301ff854b8b8017437ad9989efa117 (diff)
parent2c093ce738cb1281db04a8a3f2b6a35b3aa9b354 (diff)
downloadwhich-ui-bdb4d194307c9755c2083c1a11bb876abebcb6de.tar.gz
Merge pull request #102 from which-ecosystem/feat/modal
Modal improvements
Diffstat (limited to 'src/containers/Page/Page.tsx')
-rw-r--r--src/containers/Page/Page.tsx8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/containers/Page/Page.tsx b/src/containers/Page/Page.tsx
index b7e1938..e60f7da 100644
--- a/src/containers/Page/Page.tsx
+++ b/src/containers/Page/Page.tsx
@@ -10,10 +10,6 @@ import DynoWaiter from './DynoWaiter';
import Loading from '../../components/Loading/Loading';
import EmptyState from '../../components/EmptyState/EmptyState';
-interface HistoryChange {
- state?: LocationState | null;
-}
-
const useStyles = makeStyles(theme => ({
root: {
[theme.breakpoints.down('sm')]: {
@@ -32,10 +28,10 @@ const ErrorFallback: React.FC = () => (
const Page: React.FC = () => {
const classes = useStyles();
const theme = useTheme();
- const history = useHistory();
+ const history = useHistory<LocationState>();
const isMobile = useMediaQuery(theme.breakpoints.down('sm'));
- useEffect(() => history.listen((update: HistoryChange) => {
+ useEffect(() => history.listen(update => {
if (!update.state?.background) window.scrollTo(0, 0);
}), [history]);