From 8a10eb265db7fddb7989d0a60b76f3fbf91987db Mon Sep 17 00:00:00 2001 From: "Kalle (Sendou)" <38327916+Sendouc@users.noreply.github.com> Date: Wed, 18 Nov 2020 01:16:45 +0200 Subject: [PATCH] adjust container size --- components/common/MyInfiniteScroller.tsx | 11 +---------- components/layout/index.tsx | 16 +--------------- 2 files changed, 2 insertions(+), 25 deletions(-) diff --git a/components/common/MyInfiniteScroller.tsx b/components/common/MyInfiniteScroller.tsx index ac2e429c5..27e68b292 100644 --- a/components/common/MyInfiniteScroller.tsx +++ b/components/common/MyInfiniteScroller.tsx @@ -16,16 +16,7 @@ const MyInfiniteScroller: React.FC = ({ children }) => { loadMore={(page) => setElementsToShow(page * 12)} hasMore={elementsToShow < children.length} > - + {children.slice(0, elementsToShow)} diff --git a/components/layout/index.tsx b/components/layout/index.tsx index 8c841045e..47d6a60f0 100644 --- a/components/layout/index.tsx +++ b/components/layout/index.tsx @@ -2,20 +2,11 @@ import { Container, Flex, useToast } from "@chakra-ui/react"; import { t } from "@lingui/macro"; import { getToastOptions } from "lib/getToastOptions"; import { AppProps } from "next/app"; -import { useRouter } from "next/dist/client/router"; import { SWRConfig } from "swr"; import Footer from "./Footer"; import IconNavBar from "./IconNavBar"; import TopNav from "./TopNav"; -const PAGES_WITH_WIDE_CONTAINER = [ - "/analyzer", - "/xsearch", - "/builds", - "/plans", - "/xleaderboards", -]; - function reviver(key: any, value: any) { if (Array.isArray(value)) { return value.map((entry) => { @@ -33,7 +24,6 @@ function reviver(key: any, value: any) { const Layout = ({ Component, pageProps }: AppProps) => { const toast = useToast(); - const pathname = useRouter().pathname; return ( { - +