Skip to content

Commit

Permalink
Removed unused variables (#6704) (#6750)
Browse files Browse the repository at this point in the history
  • Loading branch information
blam404 committed Jan 31, 2023
1 parent 0ffed24 commit 7a6e7c2
Show file tree
Hide file tree
Showing 27 changed files with 15 additions and 42 deletions.
2 changes: 1 addition & 1 deletion apps/web/components/booking/CancelBooking.tsx
Expand Up @@ -29,7 +29,7 @@ export default function CancelBooking(props: Props) {
const [cancellationReason, setCancellationReason] = useState<string>("");
const { t } = useLocale();
const router = useRouter();
const { booking, profile, team, allRemainingBookings } = props;
const { booking, allRemainingBookings } = props;
const [loading, setLoading] = useState(false);
const telemetry = useTelemetry();
const [error, setError] = useState<string | null>(booking ? null : t("booking_already_cancelled"));
Expand Down
2 changes: 1 addition & 1 deletion apps/web/components/eventtype/EventTeamWebhooksTab.tsx
@@ -1,4 +1,4 @@
import { EventTypeSetupProps, FormValues } from "pages/event-types/[type]";
import { EventTypeSetupProps } from "pages/event-types/[type]";
import { useState } from "react";
import { TbWebhook } from "react-icons/tb";

Expand Down
@@ -1,5 +1,3 @@
import { useLocale } from "@calcom/lib/hooks/useLocale";

import { CalendarSwitch } from "./CalendarSwitch";

interface IConnectedCalendarItem {
Expand All @@ -21,7 +19,7 @@ interface IConnectedCalendarItem {

const ConnectedCalendarItem = (prop: IConnectedCalendarItem) => {
const { name, logo, externalId, calendars, integrationType } = prop;
const { t } = useLocale();

return (
<>
<div className="flex flex-row items-center p-4">
Expand Down
1 change: 0 additions & 1 deletion apps/web/pages/[user]/[type].tsx
@@ -1,6 +1,5 @@
import MarkdownIt from "markdown-it";
import { GetStaticPaths, GetStaticPropsContext } from "next";
import { JSONObject } from "superjson/dist/types";
import { z } from "zod";

import { privacyFilteredLocations, LocationObject } from "@calcom/app-store/locations";
Expand Down
1 change: 0 additions & 1 deletion apps/web/pages/[user]/book.tsx
@@ -1,5 +1,4 @@
import { GetServerSidePropsContext } from "next";
import { JSONObject } from "superjson/dist/types";

import { LocationObject, privacyFilteredLocations } from "@calcom/app-store/locations";
import { parseRecurringEvent } from "@calcom/lib";
Expand Down
4 changes: 2 additions & 2 deletions apps/web/pages/api/auth/setup.ts
@@ -1,5 +1,5 @@
import { IdentityProvider } from "@prisma/client";
import { NextApiRequest, NextApiResponse } from "next";
import { NextApiRequest } from "next";
import z from "zod";

import { isPasswordValid } from "@calcom/lib/auth";
Expand Down Expand Up @@ -50,7 +50,7 @@ async function handler(req: NextApiRequest) {
},
});

return { message: "First admin user created successfuly." };
return { message: "First admin user created successfully." };
}

export default defaultHandler({
Expand Down
1 change: 0 additions & 1 deletion apps/web/pages/d/[link]/book.tsx
@@ -1,5 +1,4 @@
import { GetServerSidePropsContext } from "next";
import { JSONObject } from "superjson/dist/types";

import { parseRecurringEvent } from "@calcom/lib";
import prisma from "@calcom/prisma";
Expand Down
2 changes: 0 additions & 2 deletions apps/web/pages/event-types/[type]/index.tsx
Expand Up @@ -10,8 +10,6 @@ import { z } from "zod";
import { EventLocationType } from "@calcom/core/location";
import { validateBookingLimitOrder } from "@calcom/lib";
import { CAL_URL } from "@calcom/lib/constants";
import convertToNewDurationType from "@calcom/lib/convertToNewDurationType";
import findDurationType from "@calcom/lib/findDurationType";
import getEventTypeById from "@calcom/lib/getEventTypeById";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { useTypedQuery } from "@calcom/lib/hooks/useTypedQuery";
Expand Down
2 changes: 0 additions & 2 deletions apps/web/pages/settings/billing/index.tsx
Expand Up @@ -7,7 +7,6 @@ import { getLayout } from "@calcom/features/settings/layouts/SettingsLayout";
import { classNames } from "@calcom/lib";
import { WEBAPP_URL } from "@calcom/lib/constants";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { trpc } from "@calcom/trpc/react";
import { Button, Meta } from "@calcom/ui";
import { FiExternalLink } from "@calcom/ui/components/icon";

Expand Down Expand Up @@ -37,7 +36,6 @@ const CtaRow = ({ title, description, className, children }: CtaRowProps) => {

const BillingView = () => {
const { t } = useLocale();
const { data: user } = trpc.viewer.me.useQuery();
const [, loadChat] = useChat();
const [showChat, setShowChat] = useState(false);
const router = useRouter();
Expand Down
2 changes: 0 additions & 2 deletions apps/web/pages/settings/my-account/appearance.tsx
@@ -1,5 +1,4 @@
import { GetServerSidePropsContext } from "next";
import { useSession } from "next-auth/react";
import { Controller, useForm } from "react-hook-form";

import { getLayout } from "@calcom/features/settings/layouts/SettingsLayout";
Expand Down Expand Up @@ -47,7 +46,6 @@ const SkeletonLoader = ({ title, description }: { title: string; description: st

const AppearanceView = () => {
const { t } = useLocale();
const session = useSession();
const utils = trpc.useContext();
const { data: user, isLoading } = trpc.viewer.me.useQuery();

Expand Down
1 change: 0 additions & 1 deletion apps/web/pages/team/[slug]/book.tsx
@@ -1,5 +1,4 @@
import { GetServerSidePropsContext } from "next";
import { JSONObject } from "superjson/dist/types";

import { LocationObject, privacyFilteredLocations } from "@calcom/app-store/locations";
import { parseRecurringEvent } from "@calcom/lib";
Expand Down
4 changes: 0 additions & 4 deletions apps/web/playwright/auth/auth-index.e2e.ts
@@ -1,7 +1,3 @@
import { expect } from "@playwright/test";

import { WEBAPP_URL } from "@calcom/lib/constants";

import { test } from "../lib/fixtures";
import { todo } from "../lib/testUtils";

Expand Down
2 changes: 1 addition & 1 deletion apps/web/playwright/trial.e2e.ts
@@ -1,4 +1,4 @@
import { expect, test } from "@playwright/test";
import { test } from "@playwright/test";

import { todo } from "./lib/testUtils";

Expand Down
1 change: 0 additions & 1 deletion packages/app-store/around/components/InstallAppButton.tsx
@@ -1,7 +1,6 @@
import type { InstallAppButtonProps } from "@calcom/app-store/types";

import useAddAppMutation from "../../_utils/useAddAppMutation";
import appConfig from "../config.json";

export default function InstallAppButton(props: InstallAppButtonProps) {
const mutation = useAddAppMutation("around_video");
Expand Down
2 changes: 0 additions & 2 deletions packages/app-store/giphy/api/get.ts
@@ -1,8 +1,6 @@
import type { NextApiRequest, NextApiResponse } from "next";
import { z, ZodError } from "zod";

import prisma from "@calcom/prisma";

import { GiphyManager } from "../lib";

const giphyUrlRegexp = new RegExp("^https://(.*).giphy.com/media/(.*)/giphy.gif(.*)");
Expand Down
@@ -1,4 +1,4 @@
import { useState, useEffect } from "react";
import { useState } from "react";

import type { InstallAppButtonProps } from "@calcom/app-store/types";
import useApp from "@calcom/lib/hooks/useApp";
Expand Down
@@ -1,7 +1,6 @@
import type { InstallAppButtonProps } from "@calcom/app-store/types";

import useAddAppMutation from "../../_utils/useAddAppMutation";
import appConfig from "../config.json";

export default function InstallAppButton(props: InstallAppButtonProps) {
const mutation = useAddAppMutation("riverside_video");
Expand Down
1 change: 0 additions & 1 deletion packages/app-store/salesforce/api/callback.ts
Expand Up @@ -11,7 +11,6 @@ import getInstalledAppPath from "../../_utils/getInstalledAppPath";

let consumer_key = "";
let consumer_secret = "";
const instance_url = "";

export default async function handler(req: NextApiRequest, res: NextApiResponse) {
const { code } = req.query;
Expand Down
1 change: 0 additions & 1 deletion packages/app-store/salesforce/lib/CalendarService.ts
Expand Up @@ -5,7 +5,6 @@ import { getLocation } from "@calcom/lib/CalEventParser";
import { WEBAPP_URL } from "@calcom/lib/constants";
import { HttpError } from "@calcom/lib/http-error";
import logger from "@calcom/lib/logger";
import prisma from "@calcom/prisma";
import type {
Calendar,
CalendarEvent,
Expand Down
4 changes: 2 additions & 2 deletions packages/app-store/sendgrid/lib/CalendarService.ts
Expand Up @@ -75,13 +75,13 @@ export default class CloseComCalendarService implements Calendar {

async updateEvent(uid: string, event: CalendarEvent): Promise<any> {
// Unless we want to be able to support modifying an event to add more attendees
// to have them created in Sendgrid, ingoring this use case for now
// to have them created in Sendgrid, ignoring this use case for now
return Promise.resolve();
}

async deleteEvent(uid: string): Promise<void> {
// Unless we want to delete the contact in Sendgrid once the event
// is deleted just ingoring this use case for now
// is deleted just ignoring this use case for now
return Promise.resolve();
}

Expand Down
3 changes: 2 additions & 1 deletion packages/app-store/vital/api/webhook.ts
Expand Up @@ -12,7 +12,7 @@ import prisma from "@calcom/prisma";
import { Reschedule } from "../lib";
import { initVitalClient, vitalEnv } from "../lib/client";

// @Note: not being used anymore but left as example
/* @Note: not being used anymore but left as example
const getOuraSleepScore = async (user_id: string, bedtime_start: Date) => {
const vitalClient = await initVitalClient();
if (!vitalClient) throw Error("Missing vital client");
Expand All @@ -22,6 +22,7 @@ const getOuraSleepScore = async (user_id: string, bedtime_start: Date) => {
}
return +sleep_data.sleep[0].data.score;
};
*/

/**
* This is will generate a user token for a client_user_id`
Expand Down
1 change: 0 additions & 1 deletion packages/app-store/vital/lib/reschedule.ts
@@ -1,7 +1,6 @@
import { Booking, BookingReference, BookingStatus, User } from "@prisma/client";
import type { TFunction } from "next-i18next";

import EventManager from "@calcom/core/EventManager";
import { CalendarEventBuilder } from "@calcom/core/builders/CalendarEvent/builder";
import { CalendarEventDirector } from "@calcom/core/builders/CalendarEvent/director";
import { deleteMeeting } from "@calcom/core/videoClient";
Expand Down
1 change: 0 additions & 1 deletion packages/app-store/wipemycalother/lib/reschedule.ts
@@ -1,7 +1,6 @@
import { Booking, BookingReference, BookingStatus, User } from "@prisma/client";
import type { TFunction } from "next-i18next";

import EventManager from "@calcom/core/EventManager";
import { CalendarEventBuilder } from "@calcom/core/builders/CalendarEvent/builder";
import { CalendarEventDirector } from "@calcom/core/builders/CalendarEvent/director";
import { deleteMeeting } from "@calcom/core/videoClient";
Expand Down
2 changes: 1 addition & 1 deletion packages/embeds/embed-core/src/ModalBox/ModalBox.ts
Expand Up @@ -55,7 +55,7 @@ export class ModalBox extends HTMLElement {
once: true,
}
);
this.shadowRoot!.host.addEventListener("click", (e) => {
this.shadowRoot!.host.addEventListener("click", () => {
this.close();
});

Expand Down
4 changes: 0 additions & 4 deletions packages/embeds/embed-core/src/embed-iframe.ts
Expand Up @@ -108,8 +108,6 @@ interface EmbedNonStylesConfig {
};
}

type ReactEmbedStylesSetter = React.Dispatch<React.SetStateAction<EmbedStyles | EmbedNonStylesConfig>>;

const setEmbedStyles = (stylesConfig: UiConfig["styles"]) => {
embedStore.styles = stylesConfig;
for (const [, setEmbedStyle] of Object.entries(embedStore.reactStylesStateSetters)) {
Expand Down Expand Up @@ -308,7 +306,6 @@ const messageParent = (data: any) => {
function keepParentInformedAboutDimensionChanges() {
let knownIframeHeight: number | null = null;
let knownIframeWidth: number | null = null;
let numDimensionChanges = 0;
let isFirstTime = true;
let isWindowLoadComplete = false;
runAsap(function informAboutScroll() {
Expand Down Expand Up @@ -355,7 +352,6 @@ function keepParentInformedAboutDimensionChanges() {
if (knownIframeHeight !== iframeHeight || knownIframeWidth !== iframeWidth) {
knownIframeHeight = iframeHeight;
knownIframeWidth = iframeWidth;
numDimensionChanges++;
// FIXME: This event shouldn't be subscribable by the user. Only by the SDK.
sdkActionManager?.fire("__dimensionChanged", {
iframeHeight,
Expand Down
4 changes: 2 additions & 2 deletions packages/embeds/embed-core/src/embed.ts
Expand Up @@ -482,7 +482,7 @@ export class Cal {
}
});

this.actionManager.on("__iframeReady", (e) => {
this.actionManager.on("__iframeReady", () => {
this.iframeReady = true;
this.doInIframe({ method: "parentKnowsIframeReady", arg: undefined });
this.iframeDoQueue.forEach(({ method, arg }) => {
Expand All @@ -499,7 +499,7 @@ export class Cal {
}
});

this.actionManager.on("linkReady", (e) => {
this.actionManager.on("linkReady", () => {
this.modalBox?.setAttribute("state", "loaded");
this.inlineEl?.setAttribute("loading", "done");
});
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/components/form/checkbox/Checkbox.tsx
Expand Up @@ -12,7 +12,7 @@ type Props = InputHTMLAttributes<HTMLInputElement> & {
};

const CheckboxField = forwardRef<HTMLInputElement, Props>(
({ label, description, error, informationIconText, disabled, ...rest }, ref) => {
({ label, description, error, disabled, ...rest }, ref) => {
const descriptionAsLabel = !label || rest.descriptionAsLabel;
return (
<div className="block items-center sm:flex">
Expand Down

0 comments on commit 7a6e7c2

Please sign in to comment.