fix: typo in Gcal atom prop and outlook service (#15319)
* fix typo in onCheckError prop * pass in correct access token --------- Co-authored-by: Rajiv Sahal <rajivsahal@Rajivs-MacBook-Pro.local>
This commit is contained in:
co-authored by
Rajiv Sahal
parent
b15ad6f233
commit
93580ac4bc
@@ -156,7 +156,7 @@ export class OutlookService implements OAuthCalendarApp {
|
||||
|
||||
const office365OAuthCredentials = await this.getOAuthCredentials(parsedCode);
|
||||
|
||||
const defaultCalendar = await this.getDefaultCalendar(accessToken);
|
||||
const defaultCalendar = await this.getDefaultCalendar(office365OAuthCredentials.access_token);
|
||||
|
||||
if (defaultCalendar?.id) {
|
||||
const credential = await this.credentialRepository.createAppCredential(
|
||||
|
||||
@@ -3,7 +3,7 @@ import type { FC } from "react";
|
||||
import { Button } from "@calcom/ui";
|
||||
|
||||
import { useAtomsContext } from "../hooks/useAtomsContext";
|
||||
import type { OnCheckErroType } from "../hooks/useGcal";
|
||||
import type { OnCheckErrorType } from "../hooks/useGcal";
|
||||
import { useGcal } from "../hooks/useGcal";
|
||||
import { AtomsWrapper } from "../src/components/atoms-wrapper";
|
||||
import { cn } from "../src/lib/utils";
|
||||
@@ -12,7 +12,7 @@ interface GcalConnectProps {
|
||||
className?: string;
|
||||
label?: string;
|
||||
alreadyConnectedLabel?: string;
|
||||
onCheckError?: OnCheckErroType;
|
||||
onCheckError?: OnCheckErrorType;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -32,7 +32,7 @@ interface GcalConnectProps {
|
||||
* @param {string} [label="Connect Google Calendar"] - The label for the connect button. Optional.
|
||||
* @param {string} [alreadyConnectedLabel="Connected Google Calendar"] - The label for the already connected button. Optional.
|
||||
* @param {string} [className] - Additional CSS class name for the button. Optional.
|
||||
* @param {OnCheckErroType} [onCheckError] - A callback function to handle errors when checking the connection status. Optional.
|
||||
* @param {OnCheckErrorType} [onCheckError] - A callback function to handle errors when checking the connection status. Optional.
|
||||
* @returns {JSX.Element} The rendered component.
|
||||
*/
|
||||
export const GcalConnect: FC<GcalConnectProps> = ({
|
||||
|
||||
@@ -4,10 +4,10 @@ import type { ApiErrorResponse } from "@calcom/platform-types";
|
||||
|
||||
import http from "../lib/http";
|
||||
|
||||
export type OnCheckErroType = (err: ApiErrorResponse) => void;
|
||||
export type OnCheckErrorType = (err: ApiErrorResponse) => void;
|
||||
export interface useGcalProps {
|
||||
isAuth: boolean;
|
||||
onCheckError?: OnCheckErroType;
|
||||
onCheckError?: OnCheckErrorType;
|
||||
}
|
||||
|
||||
export const useGcal = ({ isAuth, onCheckError }: useGcalProps) => {
|
||||
|
||||
Reference in New Issue
Block a user