import { Button, CardHeader, IconButton, TableBody, TableCell, TableRow, Typography } from "@material-ui/core"; import DeleteIcon from "@material-ui/icons/Delete"; import { commonMessages } from "@saleor/intl"; import { renderCollection, stopPropagation } from "@saleor/misc"; import React from "react"; import { FormattedMessage } 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 CustomAppsProps { appsList: AppsList_apps_edges[]; navigateToCustomApp: (id: string) => () => void; navigateToCustomAppCreate?: () => void; onRemove: (id: string) => void; } const CustomApps: React.FC = ({ appsList, navigateToCustomAppCreate, onRemove, navigateToCustomApp }) => { const classes = useStyles({}); return ( ) } title={ } />
} > {renderCollection( appsList, (app, index) => app ? ( {app.node.name} {!app.node.isActive && (
)}
onRemove(app.node.id))} >
) : ( ), () => ( ) )}
); }; CustomApps.displayName = "CustomApps"; export default CustomApps;