chore: Remove next-collect package (#25146)

This commit is contained in:
Alex van Andel authored and GitHub committed 2025-11-19 13:54:26 +00:00
1 parent cf7430d531
commit 90a42c37fd
24 files changed
+53 -184

No files matched your search

@@ -6,8 +6,6 @@ import { sdkActionManager } from "@calcom/embed-core/embed-iframe";
import { shouldChargeNoShowCancellationFee } from "@calcom/features/bookings/lib/payment/shouldChargeNoShowCancellationFee";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { useRefreshData } from "@calcom/lib/hooks/useRefreshData";
import { useTelemetry } from "@calcom/lib/hooks/useTelemetry";
import { collectPageParameters, telemetryEventTypes } from "@calcom/lib/telemetry";
import type { RecurringEvent } from "@calcom/types/Calendar";
import { Button } from "@calcom/ui/components/button";
import { Label, Select, TextArea, CheckboxField } from "@calcom/ui/components/form";
@@ -123,7 +121,6 @@ export default function CancelBooking(props: Props) {
eventTypeMetadata,
} = props;
const [loading, setLoading] = useState(false);
const telemetry = useTelemetry();
const [error, setError] = useState<string | null>(booking ? null : t("booking_already_cancelled"));
const [internalNote, setInternalNote] = useState<{ id: number; name: string } | null>(null);
const [acknowledgeCancellationNoShowFee, setAcknowledgeCancellationNoShowFee] = useState(false);
@@ -171,7 +168,7 @@ export default function CancelBooking(props: Props) {
node.scrollIntoView({ behavior: "smooth" });
node.focus();
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
return (
@@ -264,7 +261,7 @@ export default function CancelBooking(props: Props) {
onClick={async () => {
setLoading(true);
telemetry.event(telemetryEventTypes.bookingCancelled, collectPageParameters());
// telemetry.event(telemetryEventTypes.bookingCancelled, collectPageParameters());
const response = await fetch("/api/csrf?sameSite=none", { cache: "no-store" });
const { csrfToken } = await response.json();
@@ -59,12 +59,6 @@ vi.mock("@calcom/lib/hooks/useLocale", () => ({
}),
}));
vi.mock("@calcom/lib/hooks/useTelemetry", () => ({
useTelemetry: () => ({
event: vi.fn(),
}),
}));
vi.mock("@calcom/lib/hooks/useRefreshData", () => ({
useRefreshData: () => vi.fn(),
}));
@@ -5,9 +5,7 @@ import { useRef, useState } from "react";
import { useForm } from "react-hook-form";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { useTelemetry } from "@calcom/lib/hooks/useTelemetry";
import { md } from "@calcom/lib/markdownIt";
import { telemetryEventTypes } from "@calcom/lib/telemetry";
import turndown from "@calcom/lib/turndownService";
import { localStorage } from "@calcom/lib/webstorage";
import { trpc } from "@calcom/trpc/react";
@@ -39,7 +37,6 @@ const UserProfile = ({ user }: UserProfileProps) => {
const utils = trpc.useUtils();
const router = useRouter();
const createEventType = trpc.viewer.eventTypesHeavy.create.useMutation();
const telemetry = useTelemetry();
const [firstRender, setFirstRender] = useState(true);
// Create a separate mutation for avatar updates
@@ -81,7 +78,7 @@ const UserProfile = ({ user }: UserProfileProps) => {
const onSubmit = handleSubmit((data: { bio: string }) => {
const { bio } = data;
telemetry.event(telemetryEventTypes.onboardingFinished);
// telemetry.event(telemetryEventTypes.onboardingFinished);
mutation.mutate({
bio,
@@ -1,7 +1,6 @@
"use client";
import { zodResolver } from "@hookform/resolvers/zod";
import { useEffect } from "react";
import { useForm } from "react-hook-form";
import { z } from "zod";
@@ -10,8 +9,6 @@ import { useTimePreferences } from "@calcom/features/bookings/lib";
import { TimezoneSelect } from "@calcom/features/components/timezone-select";
import { FULL_NAME_LENGTH_MAX_LIMIT } from "@calcom/lib/constants";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { useTelemetry } from "@calcom/lib/hooks/useTelemetry";
import { telemetryEventTypes } from "@calcom/lib/telemetry";
import { trpc } from "@calcom/trpc/react";
import type { RouterOutputs } from "@calcom/trpc/react";
import { Button } from "@calcom/ui/components/button";
@@ -29,7 +26,6 @@ const UserSettings = (props: IUserSettingsProps) => {
const { nextStep, user } = props;
const { t } = useLocale();
const { setTimezone: setSelectedTimeZone, timezone: selectedTimeZone } = useTimePreferences();
const telemetry = useTelemetry();
const userSettingsSchema = z.object({
name: z
.string()
@@ -50,9 +46,9 @@ const UserSettings = (props: IUserSettingsProps) => {
resolver: zodResolver(userSettingsSchema),
});
useEffect(() => {
/*useEffect(() => {
telemetry.event(telemetryEventTypes.onboardingStarted);
}, [telemetry]);
}, [telemetry]);*/
const utils = trpc.useUtils();
const onSuccess = async () => {