refactor: rename getEventLocationType to getLocationByType for better clarity (#28567)

* chore: rename getEventLocationType

* chore: update imports
This commit is contained in:
Anirban Singha authored and GitHub committed 2026-07-09 09:22:35 +00:00
1 parent 761b780aa2
commit f004349273
10 files changed
+45 -46

No files matched your search

@@ -4,7 +4,7 @@ import { useForm } from "react-hook-form";
import { z } from "zod";
import type { EventLocationType } from "@calcom/app-store/locations";
import { getEventLocationType } from "@calcom/app-store/locations";
import { getLocationByType } from "@calcom/app-store/locations";
import { Dialog } from "@calcom/features/components/controlled-dialog";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { Button } from "@calcom/ui/components/button";
@@ -37,7 +37,7 @@ export function AppSetDefaultLinkDialog({
handleUpdateUserDefaultConferencingApp: (params: UpdateUsersDefaultConferencingAppParams) => void;
}) {
const { t } = useLocale();
const eventLocationTypeOptions = getEventLocationType(locationType.type);
const eventLocationTypeOptions = getLocationByType(locationType.type);
const form = useForm<LocationTypeSetLinkDialogFormProps>({
resolver: zodResolver(
@@ -1,6 +1,6 @@
import type { LocationObject } from "@calcom/app-store/locations";
import { locationKeyToString } from "@calcom/app-store/locations";
import { getEventLocationType } from "@calcom/app-store/locations";
import { getLocationByType } from "@calcom/app-store/locations";
import { getTranslatedLocation } from "@calcom/app-store/locations";
import type { useLocale } from "@calcom/lib/hooks/useLocale";
import notEmpty from "@calcom/lib/notEmpty";
@@ -11,7 +11,7 @@ export default function getLocationsOptionsForSelect(
) {
return locations
.map((location) => {
const eventLocation = getEventLocationType(location.type);
const eventLocation = getLocationByType(location.type);
const locationString = locationKeyToString(location);
if (typeof locationString !== "string" || !eventLocation) {