import { Card, TableBody, TableCell, TableFooter, TableRow, Typography } from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import TablePagination from "@saleor/components/TablePagination"; import { AppsListQuery } from "@saleor/graphql"; import { Button, DeleteIcon, IconButton, ResponsiveTable } from "@saleor/macaw-ui"; 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 AppsSkeleton from "../AppsSkeleton"; import DeactivatedText from "../DeactivatedText"; export interface InstalledAppsProps extends ListProps { appsList: AppsListQuery["apps"]["edges"]; onRemove: (id: string) => void; onRowAboutClick: (id: string) => () => void; } const numberOfColumns = 2; const InstalledApps: React.FC = ({ appsList, onRemove, settings, disabled, onNextPage, onPreviousPage, onRowClick, onRowAboutClick, onUpdateListSettings, 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;