import saleorDarkLogoSmall from "@assets/images/logo-dark-small.svg"; import plusIcon from "@assets/images/plus-icon.svg"; import { Card, CardContent, Grid, Typography } from "@material-ui/core"; import { Button } from "@saleor/components/Button"; import CardSpacer from "@saleor/components/CardSpacer"; import CardTitle from "@saleor/components/CardTitle"; import Container from "@saleor/components/Container"; import Hr from "@saleor/components/Hr"; import Skeleton from "@saleor/components/Skeleton"; import { AppFetchMutation, AppInstallMutation } from "@saleor/graphql"; import { SubmitPromise } from "@saleor/hooks/useForm"; import { buttonMessages } from "@saleor/intl"; import clsx from "clsx"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; import { useStyles } from "../../styles"; export interface AppInstallPageProps { data: NonNullable["manifest"]; loading: boolean; navigateToAppsList: () => void; onSubmit: () => SubmitPromise< NonNullable["errors"] >; } export const AppInstallPage: React.FC = ({ data, loading, navigateToAppsList, onSubmit, }) => { const intl = useIntl(); const classes = useStyles({}); const name = data?.name || ""; return ( ) : ( intl.formatMessage( { id: "Id7C0X", defaultMessage: `You are about to install {name}`, description: "section header", }, { name }, ) ) } /> {loading ? ( ) : (

{name?.charAt(0).toUpperCase()}

)}
{loading ? ( ) : ( <> {!!data?.permissions?.length && (
    {data?.permissions?.map(perm => (
  • {perm.name}
  • ))}
)}
{!!data?.dataPrivacyUrl && ( )} )}
); }; AppInstallPage.displayName = "AppInstallPage"; export default AppInstallPage;