mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-09-25 04:37:13 -05:00
closes #243
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -3,7 +3,6 @@ body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user