Skip to content

Commit 0ec1638

Browse files
authored
chore: Clean up some code, like console.log, tsx -> ts (calcom#23321)
1 parent 2516e18 commit 0ec1638

20 files changed

Lines changed: 8 additions & 23 deletions

File tree

apps/web/components/dialog/RerouteDialog.tsx

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -539,18 +539,11 @@ const NewRoutingManager = ({
539539
url: chosenEventUrls.eventBookingAbsoluteUrl,
540540
});
541541

542-
console.log("SETTING NEW VALUE", {
543-
type: "reschedule_to_different_event_new_tab",
544-
reschedulerWindow,
545-
newBooking: null,
546-
});
547542
reroutingState.setValue({
548543
type: "reschedule_to_different_event_new_tab",
549544
reschedulerWindow,
550545
newBooking: null,
551546
});
552-
553-
console.log("VALUE NOW", JSON.stringify(reroutingState));
554547
}
555548

556549
function reroutingPreview() {

apps/web/components/notification-sound-handler.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ export function NotificationSoundHandler() {
2222
const response = await fetch("/ring.mp3");
2323
const arrayBuffer = await response.arrayBuffer();
2424
audioBufferRef.current = await audioContextRef.current.decodeAudioData(arrayBuffer);
25-
console.log("Audio file loaded and decoded");
2625
}
2726

2827
return true;
@@ -62,7 +61,6 @@ export function NotificationSoundHandler() {
6261

6362
source.loop = true;
6463
source.start(0);
65-
console.log("Sound started playing");
6664

6765
setTimeout(() => {
6866
if (sourceRef.current === source) {
@@ -101,7 +99,7 @@ export function NotificationSoundHandler() {
10199

102100
useEffect(() => {
103101
if (!("serviceWorker" in navigator)) {
104-
console.log("ServiceWorker not available");
102+
console.warn("ServiceWorker not available");
105103
return;
106104
}
107105

File renamed without changes.

apps/web/lib/apps/categories/[category]/getStaticProps.tsx renamed to apps/web/lib/apps/categories/[category]/getStaticProps.ts

File renamed without changes.
File renamed without changes.

apps/web/modules/auth/platform/authorize-view.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ import { APP_NAME } from "@calcom/lib/constants";
66
import { useCompatSearchParams } from "@calcom/lib/hooks/useCompatSearchParams";
77
import { useLocale } from "@calcom/lib/hooks/useLocale";
88
import { PERMISSIONS_GROUPED_MAP } from "@calcom/platform-constants/permissions";
9-
import { Icon } from "@calcom/ui/components/icon";
109
import { Avatar } from "@calcom/ui/components/avatar";
1110
import { Button } from "@calcom/ui/components/button";
11+
import { Icon } from "@calcom/ui/components/icon";
1212

1313
import { hasPermission } from "../../../../../packages/platform/utils/permissions";
1414

@@ -32,8 +32,6 @@ export default function Authorize() {
3232
permissions: 7,
3333
};
3434

35-
console.log("These are the search params:", queryString);
36-
3735
const permissions = Object.values(PERMISSIONS_GROUPED_MAP).map((value) => {
3836
let permissionsMessage = "";
3937
const hasReadPermission = hasPermission(client.permissions, value.read);

apps/web/modules/signup-view.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ export default function Signup({
197197

198198
useEffect(() => {
199199
if (redirectUrl) {
200+
// eslint-disable-next-line @calcom/eslint/avoid-web-storage
200201
localStorage.setItem("onBoardingRedirect", redirectUrl);
201202
}
202203
}, [redirectUrl]);
@@ -216,7 +217,6 @@ export default function Signup({
216217
if (err.checkoutSessionId) {
217218
const stripe = await getStripe();
218219
if (stripe) {
219-
console.log("Redirecting to stripe checkout");
220220
const { error } = await stripe.redirectToCheckout({
221221
sessionId: err.checkoutSessionId,
222222
});
@@ -470,6 +470,7 @@ export default function Signup({
470470
showToast("error", t("username_required"));
471471
return;
472472
}
473+
// eslint-disable-next-line @calcom/eslint/avoid-web-storage
473474
localStorage.setItem("username", username);
474475
const sp = new URLSearchParams();
475476
// @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({
539540
if (prepopulateFormValues?.username) {
540541
// If username is present we save it in query params to check for premium
541542
searchQueryParams.set("username", prepopulateFormValues.username);
543+
// eslint-disable-next-line @calcom/eslint/avoid-web-storage
542544
localStorage.setItem("username", prepopulateFormValues.username);
543545
}
544546
if (token) {

0 commit comments

Comments
 (0)