fix: lint errors (#17351)
This commit is contained in:
@@ -25,6 +25,7 @@ export function WithLayout<T extends Record<string, any>>({
|
||||
isBookingPage,
|
||||
requiresLicense,
|
||||
}: WithLayoutParams<T>) {
|
||||
// eslint-disable-next-line react/display-name
|
||||
return async <P extends "P" | "L">(p: P extends "P" ? PageProps : LayoutProps) => {
|
||||
const h = headers();
|
||||
const nonce = h.get("x-nonce") ?? undefined;
|
||||
|
||||
@@ -165,8 +165,8 @@ export const AppList = ({ data, handleDisconnect, variant, listClassName }: AppL
|
||||
{cardsForAppsWithTeams.map((apps) => apps.map((cards) => cards))}
|
||||
{data.items
|
||||
.filter((item) => item.invalidCredentialIds)
|
||||
.map((item) => {
|
||||
if (!item.teams.length) return <ChildAppCard item={item} />;
|
||||
.map((item, i) => {
|
||||
if (!item.teams.length) return <ChildAppCard key={i} item={item} />;
|
||||
})}
|
||||
</List>
|
||||
{locationType && (
|
||||
|
||||
@@ -26,7 +26,7 @@ import { trpc } from "@calcom/trpc/react";
|
||||
import type { Ensure } from "@calcom/types/utils";
|
||||
import { Dialog, DialogContent, DialogFooter, DialogHeader } from "@calcom/ui";
|
||||
import { Button, Tooltip } from "@calcom/ui";
|
||||
import { showToast } from "@calcom/ui/toast";
|
||||
import { showToast } from "@calcom/ui";
|
||||
|
||||
const enum ReroutingStatusEnum {
|
||||
REROUTING_NOT_INITIATED = "not_initiated",
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { act, fireEvent, render, screen, waitFor } from "@testing-library/react";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { act, fireEvent, render, screen } from "@testing-library/react";
|
||||
import { vi } from "vitest";
|
||||
|
||||
import { RouteActionType } from "@calcom/app-store/routing-forms/zod";
|
||||
@@ -209,7 +208,7 @@ vi.mock("@calcom/trpc/react", () => ({
|
||||
},
|
||||
}));
|
||||
|
||||
let mockMutateFn = vi.fn(({ __testOnSuccess }) => {
|
||||
const mockMutateFn = vi.fn(({ __testOnSuccess }) => {
|
||||
__testOnSuccess({
|
||||
uid: "RESCHEDULED_BOOKING_UID_SAME_TIMESLOT",
|
||||
});
|
||||
@@ -351,7 +350,7 @@ describe("RerouteDialog", () => {
|
||||
|
||||
test("verify_new_route button is enabled even when form fields are not filled", async () => {
|
||||
render(<RerouteDialog isOpenDialog={true} setIsOpenDialog={mockSetIsOpenDialog} booking={mockBooking} />);
|
||||
expect(screen.getByText("verify_new_route")).toBeEnabled();
|
||||
await expect(screen.getByText("verify_new_route")).toBeEnabled();
|
||||
});
|
||||
|
||||
test("disabledFields are passed to FormInputFields with value ['email'] - email field is disabled", async () => {
|
||||
@@ -388,7 +387,7 @@ describe("RerouteDialog", () => {
|
||||
eventTypeText: "team/test-team/new-test-event",
|
||||
eventTypeHref: "https://cal.com/team/test-team/new-test-event",
|
||||
});
|
||||
expect(screen.getByText("verify_new_route")).toBeEnabled();
|
||||
await expect(screen.getByText("verify_new_route")).toBeEnabled();
|
||||
expect(screen.getByTestId("reroute-preview-hosts")).toHaveTextContent("reroute_preview_possible_host");
|
||||
expect(screen.getByTestId("reroute-preview-hosts")).toHaveTextContent("matching-user-1@example.com");
|
||||
|
||||
|
||||
@@ -2,16 +2,15 @@ self.addEventListener("push", async (event) => {
|
||||
let notificationData = event.data.json();
|
||||
|
||||
const allClients = await clients.matchAll({
|
||||
type: 'window',
|
||||
includeUncontrolled: true
|
||||
type: "window",
|
||||
includeUncontrolled: true,
|
||||
});
|
||||
|
||||
if(!allClients.length) {
|
||||
if (!allClients.length) {
|
||||
console.log("No open tabs, skipping the push notification.");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
const title = notificationData.title || "You have a new notification from Cal.com";
|
||||
const image = "https://cal.com/api/logo?type=icon";
|
||||
const newNotificationOptions = {
|
||||
@@ -27,7 +26,6 @@ self.addEventListener("push", async (event) => {
|
||||
tag: `notification-${Date.now()}-${Math.random()}`,
|
||||
};
|
||||
|
||||
|
||||
const existingNotifications = await self.registration.getNotifications();
|
||||
|
||||
// Display each existing notification again to make sure old ones can still be clicked
|
||||
@@ -45,7 +43,6 @@ self.addEventListener("push", async (event) => {
|
||||
self.registration.showNotification(notification.title, options);
|
||||
});
|
||||
|
||||
|
||||
// Show the new notification
|
||||
self.registration.showNotification(title, newNotificationOptions);
|
||||
});
|
||||
@@ -59,7 +56,7 @@ self.addEventListener("notificationclick", (event) => {
|
||||
}
|
||||
|
||||
switch (event.action) {
|
||||
case 'connect-action':
|
||||
case "connect-action":
|
||||
event.notification.close();
|
||||
const url = event.notification.data.url;
|
||||
event.waitUntil(self.clients.openWindow(url));
|
||||
|
||||
Reference in New Issue
Block a user