From 8660ae7ba37c3e1812bfbbf4bca31bfe3274edcf Mon Sep 17 00:00:00 2001
From: eug-vs <eug-vs@keemail.me>
Date: Thu, 8 Oct 2020 19:22:09 +0300
Subject: fix: resolve ts errors

---
 src/containers/Page/Page.tsx | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

(limited to 'src/containers/Page/Page.tsx')

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]);
 
-- 
cgit v1.2.3

