import { borderHeight, topBarHeight, } from "@dashboard/components/AppLayout/consts"; import { TopNav } from "@dashboard/components/AppLayout/TopNav"; import { Button } from "@dashboard/components/Button"; 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 { sectionNames } from "@dashboard/intl"; import { renderCollection } from "@dashboard/misc"; import { TableBody, TableCell, Typography } from "@material-ui/core"; import { DeleteIcon, IconButton, ResponsiveTable } from "@saleor/macaw-ui"; import { Box, Text } from "@saleor/macaw-ui/next"; 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 ( <> {renderCollection( appsList, (app, index) => app ? ( {app.name} {!app.isActive && (
)}
onRemove(app.id)} >
) : ( ), () => ( ), )}
); }; CustomAppListPage.displayName = "CustomAppListPage"; export default CustomAppListPage;