Skip to content

Scheduling infrastructure for absolutely everyone.

Fix prettier error on App component (#10287)

Joe Au-Yeungb49952b8d83e
diff --git a/apps/web/components/apps/App.tsx b/apps/web/components/apps/App.tsx
index 15f3d5d604d..e9b1ff4aff3 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 (
- <InstallAppButtonChild appCategories={categories} userAdminTeams={appDbQuery.data?.userAdminTeams} addAppMutationInput={{type, variant, slug}} credentials={appDbQuery.data?.credentials} {...props} />
+ <InstallAppButtonChild appCategories={categories} userAdminTeams={appDbQuery.data?.userAdminTeams} addAppMutationInput={{ type, variant, slug }} credentials={appDbQuery.data?.credentials} {...props} />
);
}}
/>
@@ -426,7 +426,7 @@ const InstallAppButtonChild = ({
size="base">
{multiInstall ? t("install_another") : t("install_app")}
</Button>
-
+
}
return (
@@ -444,49 +444,50 @@ const InstallAppButtonChild = ({
</DropdownMenuTrigger>
<DropdownMenuPortal>
<DropdownMenuContent
- onInteractOutside={(event) => {
- if (mutation.isLoading) event.preventDefault();
- }}
+ onInteractOutside={(event) => {
+ if (mutation.isLoading) event.preventDefault();
+ }}
>
{mutation.isLoading && (
- <div className="z-1 fixed inset-0 flex items-center justify-center bg-black bg-opacity-50">
- <Spinner />
- </div>
- )}
+ <div className="z-1 fixed inset-0 flex items-center justify-center bg-black bg-opacity-50">
+ <Spinner />
+ </div>
+ )}
<DropdownMenuLabel>{t("install_app_on")}</DropdownMenuLabel>
{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 (
- <DropdownItem
- type="button"
- data-testid={team.isUser ? "install-app-button-personal" : "anything else"}
- key={team.id}
- disabled={
- isInstalled
- }
- StartIcon={(props) => (
- <Avatar
- alt={team.logo || ""}
- imageSrc={team.logo || `${CAL_URL}/${team.logo}/avatar.png`} // if no image, use default avatar
- size="sm"
- {...props}
- />
- )}
- onClick={() => {
- mutation.mutate(
- team.isUser ? addAppMutationInput : { ...addAppMutationInput, teamId: team.id }
- );
- }}>
- <p>{team.name}{" "}
- {isInstalled &&
- `(${t("installed")})`}</p>
- </DropdownItem>
-)})}
+ <DropdownItem
+ type="button"
+ data-testid={team.isUser ? "install-app-button-personal" : "anything else"}
+ key={team.id}
+ disabled={
+ isInstalled
+ }
+ StartIcon={(props) => (
+ <Avatar
+ alt={team.logo || ""}
+ imageSrc={team.logo || `${CAL_URL}/${team.logo}/avatar.png`} // if no image, use default avatar
+ size="sm"
+ {...props}
+ />
+ )}
+ onClick={() => {
+ mutation.mutate(
+ team.isUser ? addAppMutationInput : { ...addAppMutationInput, teamId: team.id }
+ );
+ }}>
+ <p>{team.name}{" "}
+ {isInstalled &&
+ `(${t("installed")})`}</p>
+ </DropdownItem>
+ )
+ })}
</DropdownMenuContent>
</DropdownMenuPortal>
</Dropdown>