From 39446e1d3e9dd348b761573c56aae78df1397907 Mon Sep 17 00:00:00 2001 From: "Collin M. Barrett" Date: Sun, 12 Aug 2018 15:43:12 -0500 Subject: [PATCH] try only updating page size on mount ref #333 --- src/FilterLists.Web/ClientApp/components/Home.tsx | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/FilterLists.Web/ClientApp/components/Home.tsx b/src/FilterLists.Web/ClientApp/components/Home.tsx index e242553b2..f1c4ea132 100644 --- a/src/FilterLists.Web/ClientApp/components/Home.tsx +++ b/src/FilterLists.Web/ClientApp/components/Home.tsx @@ -43,7 +43,6 @@ export class Home extends React.Component, IHomeState> { componentDidMount() { this.updatePageSize(); - window.addEventListener("resize", this.updatePageSize); fetch("https://filterlists.com/api/v1/lists") .then(response => response.json() as Promise) .then(data => { @@ -62,10 +61,6 @@ export class Home extends React.Component, IHomeState> { }); } - componentWillUnmount() { - window.removeEventListener("resize", this.updatePageSize); - } - updatePageSize() { this.setState({ pageSize: Math.floor((window.innerHeight - 361) / 52)