import { getEventLocationType, locationKeyToString } from "@calcom/app-store/locations"; import { classNames } from "@calcom/lib"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { Tooltip } from "@calcom/ui"; import { FiLink } from "@calcom/ui/components/icon"; import { Props } from "./pages/AvailabilityPage"; export function AvailableEventLocations({ locations }: { locations: Props["eventType"]["locations"] }) { const { t } = useLocale(); return locations.length ? (
{locations.map((location) => { const eventLocationType = getEventLocationType(location.type); if (!eventLocationType) { // It's possible that the location app got uninstalled return null; } return (
{eventLocationType.iconUrl === "/link.svg" ? ( ) : ( {`${eventLocationType.label} )}

{t(locationKeyToString(location) ?? "")}

); })}
) : ( <> ); }