Remove Add Another for global - fix spacing (#3432)

pull/3429/head^2
sean-brydon 2022-07-19 10:33:29 +01:00 committed by GitHub
parent 9861156edb
commit baab6ecb2e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 22 additions and 20 deletions

View File

@ -119,31 +119,33 @@ const Component = ({
<div className="mt-4 sm:mt-0 sm:text-right"> <div className="mt-4 sm:mt-0 sm:text-right">
{!isLoading ? ( {!isLoading ? (
isGlobal || (installedAppCount > 0 && allowedMultipleInstalls) ? ( isGlobal || (installedAppCount > 0 && allowedMultipleInstalls) ? (
<div className="space-x-3"> <div className="flex space-x-3">
<Button StartIcon={CheckIcon} color="secondary" disabled> <Button StartIcon={CheckIcon} color="secondary" disabled>
{installedAppCount > 0 {installedAppCount > 0
? t("active_install", { count: installedAppCount }) ? t("active_install", { count: installedAppCount })
: t("globally_install")} : t("globally_install")}
</Button> </Button>
<InstallAppButton {!isGlobal && (
type={type} <InstallAppButton
isProOnly={isProOnly} type={type}
render={({ useDefaultComponent, ...props }) => { isProOnly={isProOnly}
if (useDefaultComponent) { render={({ useDefaultComponent, ...props }) => {
props = { if (useDefaultComponent) {
onClick: () => { props = {
mutation.mutate({ type }); onClick: () => {
}, mutation.mutate({ type });
loading: mutation.isLoading, },
}; loading: mutation.isLoading,
} };
return ( }
<Button StartIcon={PlusIcon} {...props} data-testid="install-app-button"> return (
{t("add_another")} <Button StartIcon={PlusIcon} {...props} data-testid="install-app-button">
</Button> {t("add_another")}
); </Button>
}} );
/> }}
/>
)}
</div> </div>
) : ( ) : (
<InstallAppButton <InstallAppButton