import { Button } from "@dashboard/components/Button"; import CardTitle from "@dashboard/components/CardTitle"; import Container from "@dashboard/components/Container"; import PageHeader from "@dashboard/components/PageHeader"; import { TableButtonWrapper } from "@dashboard/components/TableButtonWrapper/TableButtonWrapper"; import TableRowLink from "@dashboard/components/TableRowLink"; import { CustomAppUrls } from "@dashboard/custom-apps/urls"; import { AppListItemFragment } from "@dashboard/graphql"; import { commonMessages, sectionNames } from "@dashboard/intl"; import { renderCollection } from "@dashboard/misc"; import { Card, TableBody, TableCell, Typography } from "@material-ui/core"; import { DeleteIcon, IconButton, ResponsiveTable } from "@saleor/macaw-ui"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; import AppsSkeleton from "../../../apps/components/AppsSkeleton"; import DeactivatedText from "../../../apps/components/DeactivatedText"; import { useStyles } from "../../../apps/styles"; export interface CustomAppListPageProps { appsList: AppListItemFragment[]; getCustomAppHref: (id: string) => string; onRemove: (id: string) => void; } const CustomAppListPage: React.FC = ({ appsList, onRemove, getCustomAppHref, }) => { const intl = useIntl(); const classes = useStyles({}); return (

} title={intl.formatMessage(commonMessages.customApps)} /> {renderCollection( appsList, (app, index) => app ? ( {app.name} {!app.isActive && (
)}
onRemove(app.id)} >
) : ( ), () => ( ), )}
); }; CustomAppListPage.displayName = "CustomAppListPage"; export default CustomAppListPage;