import classes from './AppGrid.module.css'; import { Link } from 'react-router-dom'; import { App } from '../../../interfaces/App'; import { AppCard } from '../AppCard/AppCard'; import { Message } from '../../UI'; interface Props { apps: App[]; totalApps?: number; searching: boolean; } export const AppGrid = (props: Props): JSX.Element => { let apps: JSX.Element; if (props.searching || props.apps.length) { if (!props.apps.length) { apps = No apps match your search criteria; } else { apps = (
{props.apps.map((app: App): JSX.Element => { return ; })}
); } } else { if (props.totalApps) { apps = ( There are no pinned applications. You can pin them from the{' '} /applications menu ); } else { apps = ( You don't have any applications. You can add a new one from{' '} /applications menu ); } } return apps; };