feat: upgrade typescript to 5.8.3 (#21449)
* feat: upgrade typescript to 5.8.3 Co-Authored-By: [email protected] <[email protected]> * chore: fix TypeScript 5.8.3 compatibility issues Co-Authored-By: [email protected] <[email protected]> * Uncomment `optmizeImage` * Type fix * Type fix --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: [email protected] <[email protected]> Co-authored-by: Joe <[email protected]>
This commit is contained in:
23 files changed
+52
-43
No files matched your search
@@ -5,7 +5,6 @@ import { getToken } from "next-auth/jwt";
|
||||
import { type ReadonlyHeaders } from "next/dist/server/web/spec-extension/adapters/headers";
|
||||
import { type ReadonlyRequestCookies } from "next/dist/server/web/spec-extension/adapters/request-cookies";
|
||||
|
||||
// @ts-expect-error no type definitions
|
||||
import { i18n } from "@calcom/config/next-i18next.config";
|
||||
|
||||
/**
|
||||
|
||||
@@ -28,8 +28,8 @@ import { useOnboarding } from "../lib/onboardingStore";
|
||||
function extractDomainFromEmail(email: string) {
|
||||
let out = "";
|
||||
try {
|
||||
const match = email.match(/^(?:.*?:\/\/)?.*?(?<root>[\w\-]*(?:\.\w{2,}|\.\w{2,}\.\w{2}))(?:[\/?#:]|$)/);
|
||||
out = (match && match.groups?.root) ?? "";
|
||||
const match = email.match(/^(?:.*?:\/\/)?.*?([\w\-]*(?:\.\w{2,}|\.\w{2,}\.\w{2}))(?:[\/?#:]|$)/);
|
||||
out = (match && match[1]) ?? "";
|
||||
} catch (ignore) {}
|
||||
return out.split(".")[0];
|
||||
}
|
||||
|
||||
@@ -2,8 +2,8 @@ import { useState } from "react";
|
||||
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import { trpc } from "@calcom/trpc/react";
|
||||
import { showToast } from "@calcom/ui/components/toast";
|
||||
import { SettingsToggle } from "@calcom/ui/components/form";
|
||||
import { showToast } from "@calcom/ui/components/toast";
|
||||
|
||||
const DisableTeamImpersonation = ({
|
||||
teamId,
|
||||
@@ -26,7 +26,9 @@ const DisableTeamImpersonation = ({
|
||||
await utils.viewer.teams.getMembershipbyUser.invalidate();
|
||||
},
|
||||
});
|
||||
const [allowImpersonation, setAllowImpersonation] = useState(!query.data?.disableImpersonation ?? true);
|
||||
const [allowImpersonation, setAllowImpersonation] = useState(
|
||||
query.data ? !query.data.disableImpersonation : true
|
||||
);
|
||||
if (query.isPending) return <></>;
|
||||
|
||||
return (
|
||||
|
||||
Reference in new issue
Block a user