chore: Clean up some code, like console.log, tsx -> ts (#23321)
This commit is contained in:
1 parent
2516e18ebb
commit
0ec1638ca7
20 files changed
+8
-23
No files matched your search
@@ -539,18 +539,11 @@ const NewRoutingManager = ({
|
||||
url: chosenEventUrls.eventBookingAbsoluteUrl,
|
||||
});
|
||||
|
||||
console.log("SETTING NEW VALUE", {
|
||||
type: "reschedule_to_different_event_new_tab",
|
||||
reschedulerWindow,
|
||||
newBooking: null,
|
||||
});
|
||||
reroutingState.setValue({
|
||||
type: "reschedule_to_different_event_new_tab",
|
||||
reschedulerWindow,
|
||||
newBooking: null,
|
||||
});
|
||||
|
||||
console.log("VALUE NOW", JSON.stringify(reroutingState));
|
||||
}
|
||||
|
||||
function reroutingPreview() {
|
||||
|
||||
@@ -22,7 +22,6 @@ export function NotificationSoundHandler() {
|
||||
const response = await fetch("/ring.mp3");
|
||||
const arrayBuffer = await response.arrayBuffer();
|
||||
audioBufferRef.current = await audioContextRef.current.decodeAudioData(arrayBuffer);
|
||||
console.log("Audio file loaded and decoded");
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -62,7 +61,6 @@ export function NotificationSoundHandler() {
|
||||
|
||||
source.loop = true;
|
||||
source.start(0);
|
||||
console.log("Sound started playing");
|
||||
|
||||
setTimeout(() => {
|
||||
if (sourceRef.current === source) {
|
||||
@@ -101,7 +99,7 @@ export function NotificationSoundHandler() {
|
||||
|
||||
useEffect(() => {
|
||||
if (!("serviceWorker" in navigator)) {
|
||||
console.log("ServiceWorker not available");
|
||||
console.warn("ServiceWorker not available");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -6,9 +6,9 @@ import { APP_NAME } from "@calcom/lib/constants";
|
||||
import { useCompatSearchParams } from "@calcom/lib/hooks/useCompatSearchParams";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import { PERMISSIONS_GROUPED_MAP } from "@calcom/platform-constants/permissions";
|
||||
import { Icon } from "@calcom/ui/components/icon";
|
||||
import { Avatar } from "@calcom/ui/components/avatar";
|
||||
import { Button } from "@calcom/ui/components/button";
|
||||
import { Icon } from "@calcom/ui/components/icon";
|
||||
|
||||
import { hasPermission } from "../../../../../packages/platform/utils/permissions";
|
||||
|
||||
@@ -32,8 +32,6 @@ export default function Authorize() {
|
||||
permissions: 7,
|
||||
};
|
||||
|
||||
console.log("These are the search params:", queryString);
|
||||
|
||||
const permissions = Object.values(PERMISSIONS_GROUPED_MAP).map((value) => {
|
||||
let permissionsMessage = "";
|
||||
const hasReadPermission = hasPermission(client.permissions, value.read);
|
||||
|
||||
@@ -197,6 +197,7 @@ export default function Signup({
|
||||
|
||||
useEffect(() => {
|
||||
if (redirectUrl) {
|
||||
// eslint-disable-next-line @calcom/eslint/avoid-web-storage
|
||||
localStorage.setItem("onBoardingRedirect", redirectUrl);
|
||||
}
|
||||
}, [redirectUrl]);
|
||||
@@ -216,7 +217,6 @@ export default function Signup({
|
||||
if (err.checkoutSessionId) {
|
||||
const stripe = await getStripe();
|
||||
if (stripe) {
|
||||
console.log("Redirecting to stripe checkout");
|
||||
const { error } = await stripe.redirectToCheckout({
|
||||
sessionId: err.checkoutSessionId,
|
||||
});
|
||||
@@ -470,6 +470,7 @@ export default function Signup({
|
||||
showToast("error", t("username_required"));
|
||||
return;
|
||||
}
|
||||
// eslint-disable-next-line @calcom/eslint/avoid-web-storage
|
||||
localStorage.setItem("username", username);
|
||||
const sp = new URLSearchParams();
|
||||
// @NOTE: don't remove username query param as it's required right now for stripe payment page
|
||||
@@ -539,6 +540,7 @@ export default function Signup({
|
||||
if (prepopulateFormValues?.username) {
|
||||
// If username is present we save it in query params to check for premium
|
||||
searchQueryParams.set("username", prepopulateFormValues.username);
|
||||
// eslint-disable-next-line @calcom/eslint/avoid-web-storage
|
||||
localStorage.setItem("username", prepopulateFormValues.username);
|
||||
}
|
||||
if (token) {
|
||||
|
||||
@@ -193,7 +193,7 @@ export function Segment({
|
||||
const { t } = useLocale();
|
||||
if (isPending) return <span>Loading...</span>;
|
||||
if (!attributes) {
|
||||
console.log("Error fetching attributes");
|
||||
console.error("Error fetching attributes");
|
||||
return <span>{t("something_went_wrong")}</span>;
|
||||
}
|
||||
|
||||
|
||||
@@ -128,7 +128,6 @@ export default function ApiKeyDialogForm({
|
||||
form={form}
|
||||
handleSubmit={async (event) => {
|
||||
if (defaultValues) {
|
||||
console.log("Name changed");
|
||||
await updateApiKeyMutation.mutate({ id: defaultValues.id, note: event.note });
|
||||
} else {
|
||||
const apiKey = await utils.client.viewer.apiKeys.create.mutate(event);
|
||||
|
||||
@@ -39,7 +39,7 @@ const ApiKeyListItem = ({
|
||||
showToast(t("api_key_deleted"), "success");
|
||||
},
|
||||
onError(err) {
|
||||
console.log(err);
|
||||
console.error(err);
|
||||
showToast(t("something_went_wrong"), "error");
|
||||
},
|
||||
});
|
||||
|
||||
@@ -174,7 +174,7 @@ function CreateDelegationDialog({
|
||||
serviceAccountKey: validatedKey.data,
|
||||
});
|
||||
} catch (e) {
|
||||
console.log("error", e);
|
||||
console.error(e);
|
||||
form.setError("serviceAccountKey", { message: t("invalid_service_account_key") });
|
||||
return;
|
||||
}
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -13,9 +13,6 @@ export function useTraceUpdate(props: { [s: string]: unknown } | ArrayLike<unkno
|
||||
}
|
||||
return ps;
|
||||
}, {});
|
||||
if (Object.keys(changedProps).length > 0) {
|
||||
console.log("Changed props:", changedProps);
|
||||
}
|
||||
prev.current = props;
|
||||
});
|
||||
}
|
||||
@@ -16,7 +16,6 @@ function FormStep({ currentStep, steps }: Props) {
|
||||
</p>
|
||||
<div className="flex flex-nowrap space-x-1">
|
||||
{[...Array(steps)].map((_, j) => {
|
||||
console.log({ j, currentStep });
|
||||
return (
|
||||
<div
|
||||
className={classNames(
|
||||
|
||||
@@ -14,7 +14,6 @@ const ScrollableArea = ({ children, className }: PropsWithChildren<{ className?:
|
||||
|
||||
if (scrollableElement) {
|
||||
const isElementOverflowing = scrollableElement.scrollHeight > scrollableElement.clientHeight;
|
||||
console.log({ isElementOverflowing });
|
||||
setIsOverflowingY(isElementOverflowing);
|
||||
}
|
||||
}, []);
|
||||
|
||||
Reference in new issue
Block a user