From b49952b8d83efbbde906e6c0c0065101626520b2 Mon Sep 17 00:00:00 2001 From: Joe Au-Yeung <65426560+joeauyeung@users.noreply.github.com> Date: Fri, 21 Jul 2023 04:31:02 -0400 Subject: [PATCH] Fix prettier error on App component (#10287) --- apps/web/components/apps/App.tsx | 79 ++++++++++++++++---------------- 1 file changed, 40 insertions(+), 39 deletions(-) diff --git a/apps/web/components/apps/App.tsx b/apps/web/components/apps/App.tsx index 15f3d5d604..e9b1ff4aff 100644 --- a/apps/web/components/apps/App.tsx +++ b/apps/web/components/apps/App.tsx @@ -3,7 +3,7 @@ import type { IframeHTMLAttributes } from "react"; import React, { useState, useEffect } from "react"; import { useRouter } from "next/router"; import { CAL_URL } from "@calcom/lib/constants"; -import type { RouterOutputs } from "@calcom/trpc/react"; +import type { RouterOutputs } from "@calcom/trpc/react"; import useAddAppMutation from "@calcom/app-store/_utils/useAddAppMutation"; import { InstallAppButton, AppDependencyComponent } from "@calcom/app-store/components"; @@ -217,7 +217,7 @@ const Component = ({ }; } return ( - + ); }} /> @@ -426,7 +426,7 @@ const InstallAppButtonChild = ({ size="base"> {multiInstall ? t("install_another") : t("install_app")} - + } return ( @@ -444,49 +444,50 @@ const InstallAppButtonChild = ({ { - if (mutation.isLoading) event.preventDefault(); - }} + onInteractOutside={(event) => { + if (mutation.isLoading) event.preventDefault(); + }} > {mutation.isLoading && ( -
- -
- )} +
+ +
+ )} {t("install_app_on")} {userAdminTeams.map((team) => { - + const isInstalled = credentials && - credentials.some((credential) => - credential?.teamId ? credential?.teamId === team.id : credential.userId === team.id - ) + credentials.some((credential) => + credential?.teamId ? credential?.teamId === team.id : credential.userId === team.id + ) return ( - ( - - )} - onClick={() => { - mutation.mutate( - team.isUser ? addAppMutationInput : { ...addAppMutationInput, teamId: team.id } - ); - }}> -

{team.name}{" "} - {isInstalled && - `(${t("installed")})`}

-
-)})} + ( + + )} + onClick={() => { + mutation.mutate( + team.isUser ? addAppMutationInput : { ...addAppMutationInput, teamId: team.id } + ); + }}> +

{team.name}{" "} + {isInstalled && + `(${t("installed")})`}

+
+ ) + })}