import { List, ListItem, Paper, Typography } from "@mui/material"; import { uniqueId } from "lodash"; import React from "react"; interface IProps { children: React.ReactElement | (React.ReactElement | null)[]; title: string; } export const GameOptionsPage = (props: IProps): React.ReactElement => { return ( {props.title} {(props.children as any)?.length > 1 ? ( {(props.children as React.ReactElement[]) .filter((c) => c) .map((c, i) => ( {c} ))} ) : ( props.children )} ); };