diff --git a/apps/web/components/AdditionalCalendarSelector.tsx b/apps/web/components/AdditionalCalendarSelector.tsx deleted file mode 100644 index 30b020b679..0000000000 --- a/apps/web/components/AdditionalCalendarSelector.tsx +++ /dev/null @@ -1,86 +0,0 @@ -import React from "react"; -import Select from "react-select"; -import type { OptionProps } from "react-select"; - -import { InstallAppButton } from "@calcom/app-store/components"; -import { useLocale } from "@calcom/lib/hooks/useLocale"; -import { trpc } from "@calcom/trpc/react"; -import type { App } from "@calcom/types/App"; -import { Button } from "@calcom/ui"; - -import { QueryCell } from "@lib/QueryCell"; - -interface AdditionalCalendarSelectorProps { - isLoading?: boolean; -} - -const ImageOption = (optionProps: OptionProps<{ [key: string]: string; type: App["type"] }>) => { - const { data } = optionProps; - return ( - { - return ( - - ); - }} - /> - ); -}; - -const AdditionalCalendarSelector = ({ isLoading }: AdditionalCalendarSelectorProps): JSX.Element | null => { - const { t } = useLocale(); - const query = trpc.viewer.integrations.useQuery({ variant: "calendar", onlyInstalled: true }); - - return ( - { - const options = data.items.map((item) => ({ - label: item.name, - slug: item.slug, - image: item.logo, - type: item.type, - })); - return ( - + + + - } - options={options} - isSearchable={false} - isLoading={isLoading} - components={{ Option: ImageOption }} - styles={{ - menu: (defaultStyles) => ({ - ...defaultStyles, - "@media only screen and (max-width: 640px)": { - left: "0", - }, - width: "max-content", - right: "0", - }), - indicatorSeparator: (defaultStyles) => ({ - ...defaultStyles, - display: "none", - }), - control: (defaultStyles) => ({ - ...defaultStyles, - padding: "0", - border: "0", - borderRadius: "6px", - minHeight: "auto", - }), - dropdownIndicator: (defaultStyles) => ({ - ...defaultStyles, - display: "none", - }), - valueContainer: (defaultStyles) => ({ - ...defaultStyles, - padding: "0", - }), - placeholder: (defaultStyles) => ({ - ...defaultStyles, - margin: "0", - }), - }} - /> + + + {options.map((data) => ( + + {data.slug === "add-new" ? ( + + {t("install_new_calendar_app")} + + ) : ( + { + const props = { ...installProps } as any; + return ( + + + {data.image && {data.label}} + {`${t("add")} ${data.label}`} + + + ); + }} + /> + )} + + ))} + + ); }} /> diff --git a/packages/ui/components/form/dropdown/Dropdown.tsx b/packages/ui/components/form/dropdown/Dropdown.tsx index b682d70925..e75a1e215b 100644 --- a/packages/ui/components/form/dropdown/Dropdown.tsx +++ b/packages/ui/components/form/dropdown/Dropdown.tsx @@ -135,12 +135,12 @@ export const DropdownItem = (props: DropdownItemProps) => { <> {StartIcon && } -
{children}
+
{children}
{EndIcon && }