import AppCategory, { IAppCategoryProps } from "./appCategory"; import { IAppProps } from "./app"; import { Headline, ListContainer } from "./elements"; export interface IAppListProps { categories?: Array; apps?: Array; } /** * Renders one list containing all app categories and uncategorized apps * @param {IAppListProps} props props of the given list of apps * @returns {React.ReactNode} the app list component */ const AppList = ({ categories, apps }: IAppListProps) => { if (apps || categories) { return ( Applications {categories && categories.map(({ name, items }, idx) => ( ))} {apps && ( )} ); } else { return <>; } }; export default AppList;