import Button from "@material-ui/core/Button"; import IconButton from "@material-ui/core/IconButton"; import TableBody from "@material-ui/core/TableBody"; import TableCell from "@material-ui/core/TableCell"; import TableFooter from "@material-ui/core/TableFooter"; import TableRow from "@material-ui/core/TableRow"; import Typography from "@material-ui/core/Typography"; import DeleteIcon from "@material-ui/icons/Delete"; import CardTitle from "@saleor/components/CardTitle"; import TablePagination from "@saleor/components/TablePagination"; import { renderCollection, stopPropagation } from "@saleor/misc"; import { ListProps } from "@saleor/types"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; import { useStyles } from "../../styles"; import { AppsList_apps_edges } from "../../types/AppsList"; import AppsSkeleton from "../AppsSkeleton"; import CardContainer from "../CardContainer"; import DeactivatedText from "../DeactivatedText"; export interface InstalledAppsProps extends ListProps { appsList: AppsList_apps_edges[]; onRemove: (id: string) => void; onSettingsRowClick: (id: string) => () => void; } const numberOfColumns = 2; const InstalledApps: React.FC = ({ appsList, onRemove, settings, disabled, onNextPage, onPreviousPage, onRowClick, onUpdateListSettings, onSettingsRowClick, pageInfo, ...props }) => { const intl = useIntl(); const classes = useStyles(props); return ( } > <> {renderCollection( appsList, (app, index) => app ? ( {app.node.name} {!app.node.isActive && (
)}
onRemove(app.node.id))} >
) : ( ), () => ( ) )}
); }; InstalledApps.displayName = "InstalledApps"; export default InstalledApps;