import AutoSizer from "react-virtualized-auto-sizer"; import { FixedSizeList as List } from "react-window"; import { User } from "revolt.js/dist/maps/Users"; import { forwardRef } from "preact/compat"; import { UserButton } from "../items/ButtonItem"; export type MemberListEntry = string | User; interface ItemData { entries: MemberListEntry[]; } const PADDING_SIZE = 6; const Row = ({ data, style, index, }: { data: ItemData; index: number; style: JSX.CSSProperties; }) => { const item = data.entries[index]; return (
{typeof item === "string" ? ( `cat ${item}` ) : ( openScreen({ id: "profile", user_id: user._id, }) } */ /> )}
); }; // @ts-expect-error Copied directly from example code. const innerElementType = forwardRef(({ style, ...rest }, ref) => (
)); export default function MemberList({ entries, }: { entries: MemberListEntry[]; }) { return ( {({ width, height }) => ( { // eslint-disable-next-line Row as any } )} ); }