This commit is contained in:
Kalle (Sendou)
2021-01-07 23:42:11 +02:00
parent 19d658ef07
commit 75fa057629
2 changed files with 1 additions and 9 deletions

View File

@@ -1,5 +1,5 @@
import { Flex } from "@chakra-ui/react";
import { ReactElement, ReactNodeArray, useState } from "react";
import { useState } from "react";
import InfiniteScroll from "react-infinite-scroller";
const ON_PAGE = 6;
@@ -23,11 +23,4 @@ const MyInfiniteScroller: React.FC = ({ children }) => {
);
};
function getChildrenArray(children: ReactElement): ReactNodeArray {
if (Array.isArray(children)) return children;
if (Array.isArray(children?.props.children)) return children.props.children;
throw Error("children for MyInfiniteScroller is not an array");
}
export default MyInfiniteScroller;

View File

@@ -3,7 +3,6 @@ body {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
overflow: auto;
}