Skip to content

Commit 6bdf320

Browse files
authored
fix: dont pass any default values for new oauth client creation (calcom#25734)
1 parent cdfdce5 commit 6bdf320

1 file changed

Lines changed: 1 addition & 21 deletions

File tree

apps/web/modules/settings/platform/oauth-clients/create-new-view.tsx

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { useRouter } from "next/navigation";
44

55
import Shell from "@calcom/features/shell/Shell";
66
import { ErrorCode } from "@calcom/lib/errorCodes";
7-
import { useCompatSearchParams } from "@calcom/lib/hooks/useCompatSearchParams";
87
import { useLocale } from "@calcom/lib/hooks/useLocale";
98
import type { PERMISSION_MAP } from "@calcom/platform-constants";
109
import { PERMISSIONS_GROUPED_MAP } from "@calcom/platform-constants/permissions";
@@ -18,10 +17,8 @@ import type { FormValues } from "@components/settings/platform/oauth-clients/oau
1817
import { OAuthClientForm } from "@components/settings/platform/oauth-clients/oauth-client-form";
1918

2019
export default function CreateOAuthClient() {
21-
const searchParams = useCompatSearchParams();
2220
const router = useRouter();
2321
const { t } = useLocale();
24-
const clientId = searchParams?.get("clientId") || "";
2522

2623
const { isUserLoading, isPlatformUser, isPaidUser } = useGetUserAttributes();
2724

@@ -77,24 +74,7 @@ export default function CreateOAuthClient() {
7774
</p>
7875
</div>
7976
</div>
80-
<OAuthClientForm
81-
isPending={isSaving}
82-
onSubmit={onSubmit}
83-
defaultValues={{
84-
areCalendarEventsEnabled: true,
85-
areEmailsEnabled: true,
86-
eventTypeRead: true,
87-
eventTypeWrite: true,
88-
bookingRead: true,
89-
bookingWrite: true,
90-
scheduleRead: true,
91-
scheduleWrite: true,
92-
appsRead: true,
93-
appsWrite: true,
94-
profileRead: true,
95-
profileWrite: true,
96-
}}
97-
/>
77+
<OAuthClientForm isPending={isSaving} onSubmit={onSubmit} />
9878
</div>
9979
</Shell>
10080
</div>

0 commit comments

Comments
 (0)